productInStream.cy.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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: '9',
  14. noticeId: null,
  15. noticeCode: '12312412318427128341',
  16. companyNumber: '8130',
  17. noticeTime: null,
  18. sourceType: null,
  19. moveType: null,
  20. entryNumber: null,
  21. productionCode: null,
  22. materialId: null,
  23. wbs: ' ',
  24. measurementId: null,
  25. num: null,
  26. type: null,
  27. warehousingNum: null,
  28. page: 0,
  29. limit: 0,
  30. startTime: null,
  31. endTime: null,
  32. materialName: '标贴-出厂二维码-G2.5-80kW单桩',
  33. companyName: null,
  34. wllbClass: null,
  35. materialCode: '8TK541080160',
  36. userId: '36',
  37. askGoodsId: null,
  38. wllbCode: '8TK541080160',
  39. serial: 'TAIU2RT160',
  40. producBatch: '20230404',
  41. attribute: '',
  42. storageLocationCode: '111002C01K',
  43. storageLocationName: '111002C01K',
  44. storageCode: 'RK2304040022',
  45. seq: null,
  46. userName: 'PDA',
  47. realName: 'PDA测试',
  48. scrq: '2023-04-04 18:18:23',
  49. uniqueCode: null,
  50. partType: null,
  51. supplierId: null,
  52. capacity: '1',
  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/getHalf', function({search, reply}) {
  67. generateNetworkResult({search, reply, basicData, title: 'storageCode'});
  68. });
  69. exportIntercept('/warehousing/getHalfExcel');
  70. });
  71. it('table', function() {
  72. validateExport('product_in_stream_table');
  73. selectAllFilters('product_in_stream_filter', 11);
  74. validateTableList('product_in_stream_table');
  75. validateTableSearch(
  76. 'product_in_stream_table',
  77. [
  78. 'storageCode',
  79. 'productionCode',
  80. 'wllbCode',
  81. 'materialName',
  82. 'userName',
  83. 'realName',
  84. 'storageLocationName',
  85. 'wbs',
  86. {id: 'startTime', type: 'date'},
  87. 'attribute',
  88. {id: 'companyNumber', type: 'select', value: '8130'},
  89. ],
  90. {toolId: 'product_in_stream_filter', url: '/warehousing/getHalf'},
  91. );
  92. });
  93. });