semiInStream.cy.ts 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. import {
  2. beforeSetup,
  3. exportIntercept,
  4. generateNetworkResult,
  5. intercept,
  6. intoMenu,
  7. selectAllFilters,
  8. validateExport,
  9. validateTableList,
  10. validateTableSearch,
  11. } from './utils';
  12. const basicData = {
  13. id: '30',
  14. noticeId: null,
  15. noticeCode: null,
  16. companyNumber: '8130',
  17. noticeTime: null,
  18. sourceType: null,
  19. moveType: null,
  20. entryNumber: null,
  21. productionCode: 'DD01',
  22. materialId: null,
  23. wbs: '',
  24. measurementId: null,
  25. num: null,
  26. type: null,
  27. warehousingNum: '20',
  28. page: 0,
  29. limit: 0,
  30. startTime: null,
  31. endTime: null,
  32. materialName: '酒精纸\\',
  33. companyName: null,
  34. wllbClass: null,
  35. materialCode: '2205010010020003',
  36. userId: '36',
  37. askGoodsId: null,
  38. wllbCode: '2205010010020003',
  39. serial: null,
  40. producBatch: '2023-04-12',
  41. attribute: null,
  42. storageLocationCode: 'XNKW000000',
  43. storageLocationName: null,
  44. storageCode: 'RK2304120007',
  45. seq: null,
  46. userName: 'PDA',
  47. realName: 'PDA测试',
  48. scrq: '2023-04-12 16:44:30',
  49. uniqueCode: null,
  50. partType: null,
  51. supplierId: null,
  52. capacity: null,
  53. accountName: '青岛特来电智能设备有限公司',
  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('/warehousing/getProduct', function({reply, search}) {
  67. generateNetworkResult({search, basicData, reply, title: 'storageCode'});
  68. });
  69. exportIntercept('/warehousing/productExcel');
  70. });
  71. it('table', function() {
  72. selectAllFilters('semi_in_stream_filter', 9);
  73. validateTableList('semi_in_stream_table');
  74. validateTableSearch(
  75. 'semi_in_stream_table',
  76. [
  77. 'storageCode',
  78. 'productionCode',
  79. 'wllbCode',
  80. 'materialName',
  81. 'wbs',
  82. 'userName',
  83. 'realName',
  84. {id: 'startTime', type: 'date'},
  85. {id: 'companyNumber', type: 'select', value: '8130'},
  86. ],
  87. {toolId: 'semi_in_stream_filter', url: '/warehousing/getProduct'},
  88. );
  89. validateExport('semi_in_stream_table');
  90. });
  91. });