otherIn.cy.ts 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. import {
  2. beforeSetup,
  3. generateNetworkResult,
  4. intercept,
  5. intoMenu,
  6. selectAllFilters,
  7. successIntercept,
  8. validateDelete,
  9. validateTableList,
  10. validateTableSearch,
  11. } from './utils';
  12. const basicData = {
  13. id: '50',
  14. noticeId: '00000000000000000024',
  15. noticeCode: 'SYS202304081555149178913',
  16. companyNumber: '8130',
  17. noticeTime: '2023-01-31',
  18. sourceType: '0',
  19. moveType: '109',
  20. entryNumber: '0005',
  21. productionCode: null,
  22. materialId: '00000000000000072550',
  23. wbs: ' ',
  24. measurementId: '00000000000000000001',
  25. num: '2.0',
  26. type: null,
  27. warehousingNum: '2',
  28. page: 0,
  29. limit: 0,
  30. startTime: null,
  31. endTime: null,
  32. materialName: '瑞银;一体式电表;DJZ1226;600A',
  33. companyName: '青岛特来电智能设备有限公司',
  34. wllbClass: null,
  35. materialCode: '5TK540010437W87',
  36. userId: null,
  37. askGoodsId: null,
  38. wllbCode: null,
  39. serial: null,
  40. producBatch: null,
  41. attribute: null,
  42. storageLocationCode: null,
  43. storageLocationName: null,
  44. storageCode: null,
  45. seq: null,
  46. userName: null,
  47. realName: null,
  48. scrq: null,
  49. uniqueCode: null,
  50. partType: '原材料',
  51. supplierId: null,
  52. capacity: null,
  53. accountName: null,
  54. wmsItemId: null,
  55. wmsId: null,
  56. code: null,
  57. name: null,
  58. warehouseWhere: null,
  59. };
  60. describe('其他入库', function() {
  61. beforeEach(function() {
  62. beforeSetup();
  63. intoMenu('入库管理', '其他入库');
  64. });
  65. beforeEach(function() {
  66. intercept('/queryList/getOtherReceivingGoods', function({search, reply}) {
  67. generateNetworkResult({reply, search, basicData, title: 'noticeId'});
  68. });
  69. successIntercept('/warehousing/delOtherReceivingGoods');
  70. });
  71. it('table', function() {
  72. selectAllFilters('other_in_filter', 7);
  73. validateTableList('other_in_table');
  74. validateTableSearch(
  75. 'other_in_table',
  76. [
  77. 'noticeCode',
  78. 'materialCode',
  79. 'materialName',
  80. {id: 'startTime', type: 'date'},
  81. {id: 'companyNumber', type: 'select', value: '8130'},
  82. 'wbs',
  83. {id: 'type', type: 'select', value: '1'},
  84. ],
  85. {
  86. toolId: 'other_in_filter',
  87. url: '/queryList/getOtherReceivingGoods',
  88. },
  89. );
  90. });
  91. it('opertaion', function() {
  92. validateDelete('other_in_table', '其他入库', {eq: 0, title: basicData.noticeCode});
  93. });
  94. });