factory.js 1.1 KB

1234567891011121314151617181920212223
  1. starter.factory('Pay', function ($resource, cfg, formatFilter, Tool, showPopup) {
  2. var pay = {};
  3. pay.typeList = [];
  4. pay.typeItem = {};
  5. pay.recordItem = {};
  6. pay.recordList = [];
  7. pay.detailItem = {};
  8. pay.auditstepdata = [];
  9. pay.personstepdata = [];
  10. pay.type = $resource(formatFilter('{0}pay/type/:id/', cfg.api), {}, {'get': {method: 'GET', isArray: true}, 'patch': {method: 'PATCH', isArray: true}});
  11. pay.record = $resource(formatFilter('{0}pay/record/:id/', cfg.api));
  12. pay.recordfile = $resource(formatFilter('{0}pay/recordfile/:id/', cfg.api));
  13. pay.auditstep = $resource(formatFilter('{0}pay/auditstep/:id/', cfg.api), {}, {'save': {method: 'POST', isArray: true}, 'get': {method: 'GET', isArray: true}});
  14. pay.bill = $resource(formatFilter('{0}pay/bill/', cfg.api));
  15. pay.billdetail = $resource(formatFilter('{0}pay/billdetail/:id/', cfg.api));
  16. pay.stepcopy = $resource(formatFilter('{0}pay/stepcopy/:id/', cfg.api));
  17. pay.billhistory = $resource(formatFilter('{0}pay/billhistory/:id/', cfg.api));
  18. pay.analyse = $resource(formatFilter('{0}pay/analyse/', cfg.api));
  19. return pay;
  20. });