sample-list-model.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import {
  2. Base
  3. } from '../../static/util/base.js'
  4. class SampleList extends Base {
  5. constructor() {
  6. super();
  7. }
  8. getAhSampleSheet(item,callBack) {
  9. var params = {
  10. url: '/ah/ahSampleSheet/list?pageNum=1&pageSize=100&zoneId='+item.zoneId+
  11. '&sampleId='+item.sampleId+'&taskId='+item.taskId+'&checkId='+item.checkId,
  12. sCallBack: function(res) {
  13. callBack && callBack(res)
  14. }
  15. }
  16. this.serviceRequest(params);
  17. }
  18. /**
  19. * 上报全部抽样单
  20. * @param taskId
  21. * @param zoneId
  22. * @param checkId
  23. * @param sampleId
  24. * @param callBack
  25. */
  26. upBatchSampleSheet({taskId,zoneId,checkId,sampleId},callBack){
  27. var params = {
  28. url: '/ah/ahSampleSheet/upBatchSampleSheet?zoneId='+zoneId+
  29. '&sampleId='+sampleId+'&taskId='+taskId+'&checkId='+checkId,
  30. type:"POST",
  31. sCallBack: function(res) {
  32. callBack && callBack(res.data)
  33. }
  34. }
  35. this.serviceRequest(params);
  36. }
  37. /**
  38. * 删除抽样单
  39. * @param id
  40. * @param callBack
  41. */
  42. deleteAhSampleSheet(id,callBack){
  43. const params = {
  44. url: '/ah/ahSampleSheet/'+id,
  45. type:"delete",
  46. sCallBack: function(res) {
  47. callBack && callBack(res.data)
  48. }
  49. }
  50. this.serviceRequest(params);
  51. }
  52. /**
  53. * 获取抽样单下载地址
  54. * @param id
  55. * @param callBack
  56. */
  57. exportSampleSheetPdf(id,callBack){
  58. const params = {
  59. url: '/ah/ahSampleSheet/exportSampleSheetPdf?sampleSheetId='+id,
  60. sCallBack: function(res) {
  61. callBack && callBack(res.data)
  62. }
  63. }
  64. this.serviceRequest(params);
  65. }
  66. }
  67. const _sampleList = new SampleList();
  68. export {
  69. _sampleList
  70. }