rawInStream.cy.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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: '156',
  14. wllbCode: '3415100010390008',
  15. supplierId: null,
  16. supplierName: '西安特来电智能充电科技有限公司',
  17. serial: '2',
  18. producDate: '20221021',
  19. producBatch: '20221021',
  20. capacity: '1.00',
  21. process: null,
  22. seq: null,
  23. type: '扫码入库',
  24. userId: null,
  25. departmentId: null,
  26. storageLocationCode: null,
  27. scrq: '2023-04-13 09:38:15',
  28. userName: 'PDA',
  29. realName: 'PDA测试',
  30. departmentName: '仓库管理部',
  31. storageLocationName: 'B3-10-4',
  32. orderCode: '6202023040301356',
  33. startTime: null,
  34. endTime: null,
  35. materialName: '六角螺母\\\\M16;4;彩锌;粗;GB/T41-2000\\\\',
  36. page: 0,
  37. limit: 0,
  38. storageCode: 'RK2304130003',
  39. wbs: '2',
  40. accountSleeve: '8400',
  41. accountName: '青岛特来电智能充电设备有限公司',
  42. purchaseNum: '60',
  43. transmissionType: '1',
  44. };
  45. describe('原材料入库明细', function () {
  46. beforeEach(function () {
  47. beforeSetup();
  48. intoMenu('入库管理', '原材料入库明细');
  49. });
  50. beforeEach(function () {
  51. intercept('/warehousing/warehousingFlowing', function ({reply, search}) {
  52. generateNetworkResult({reply, search, basicData, title: 'storageCode'});
  53. });
  54. exportIntercept('/warehousing/export');
  55. });
  56. it('table', function () {
  57. selectAllFilters('raw_in_stream_filter', 11);
  58. validateTableList('raw_in_stream_table');
  59. validateExport('raw_in_stream_table');
  60. validateTableSearch(
  61. 'raw_in_stream_table',
  62. [
  63. 'storageCode',
  64. 'orderCode',
  65. 'materialName',
  66. 'wllbCode',
  67. 'storageLocationName',
  68. {id: 'supplierId', type: 'select', value: 'EC92255'},
  69. 'wbs',
  70. 'userName',
  71. 'realName',
  72. {id: 'startTime', type: 'date'},
  73. {id: 'accountSleeve', type: 'select', value: '8130'},
  74. ],
  75. {toolId: 'raw_in_stream_filter', url: '/warehousing/warehousingFlowing'},
  76. );
  77. });
  78. });