rawInStream.cy.ts 2.0 KB

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