rawOutStream.cy.ts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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: '77',
  14. askGoodsId: '0002',
  15. entryNumber: null,
  16. productionCode: null,
  17. storageLocationName: 'B3-10-4',
  18. userName: 'PDA',
  19. realName: 'PDA测试',
  20. materialId: null,
  21. wbs: '2',
  22. measurementId: null,
  23. num: '1.0',
  24. outNum: null,
  25. askGoodsCode: null,
  26. companyNumber: null,
  27. companyCode: null,
  28. sqrq: null,
  29. departmentId: null,
  30. departmentName: null,
  31. department: '喷塑班组',
  32. departmentCode: null,
  33. name: null,
  34. code: null,
  35. sourceType: null,
  36. moveType: null,
  37. materialName: '六角螺母\\\\M16;4;彩锌;粗;GB/T41-2000\\\\',
  38. materialCode: null,
  39. uniqueCode: null,
  40. storageLocationCode: null,
  41. supplierId: null,
  42. serial: '5',
  43. type: '邀请出库',
  44. userId: null,
  45. scrq: '2023-04-13 10:30:06',
  46. supplierName: '西安特来电智能充电科技有限公司',
  47. producDate: null,
  48. wllbCode: '3415100010390008',
  49. page: 0,
  50. limit: 0,
  51. askGoodsType: null,
  52. startTime: null,
  53. endTime: null,
  54. process: null,
  55. askGoodsApplyType: null,
  56. partType: null,
  57. attribute: null,
  58. deliveryId: null,
  59. customerName: null,
  60. customerCode: null,
  61. warehouseWhere: null,
  62. companyName: null,
  63. storageCode: 'CK2304130001',
  64. accountSleeve: null,
  65. inventoryId: null,
  66. storageLocationCodeRk: null,
  67. accountName: null,
  68. requestTypeNumber: null,
  69. requestTypeName: null,
  70. ifCommodity: null,
  71. amount: null,
  72. };
  73. describe('原材料出库明细', function () {
  74. beforeEach(function () {
  75. beforeSetup();
  76. intoMenu('出库管理', '原材料出库明细');
  77. });
  78. beforeEach(function () {
  79. intercept('/askGoods/getRemoval', function ({reply, search}) {
  80. generateNetworkResult({search, reply, basicData, title: 'storageCode'});
  81. });
  82. exportIntercept('/askGoods/export');
  83. });
  84. it('table', function () {
  85. selectAllFilters('raw_out_stream_filter', 12);
  86. validateTableList('raw_out_stream_table');
  87. validateTableSearch(
  88. 'raw_out_stream_table',
  89. [
  90. 'storageCode',
  91. 'askGoodsCode',
  92. 'wllbCode',
  93. 'materialName',
  94. {id: 'department', type: 'select', value: '00029999'},
  95. 'storageLocationName',
  96. 'userName',
  97. 'realName',
  98. {id: 'startTime', type: 'date'},
  99. {id: 'supplierId', type: 'select', value: 'EC92255'},
  100. 'wbs',
  101. {id: 'accountSleeve', type: 'select', value: '8130'},
  102. ],
  103. {
  104. toolId: 'raw_out_stream_filter',
  105. url: '/askGoods/getRemoval',
  106. },
  107. );
  108. validateExport('raw_out_stream_table');
  109. });
  110. });