semiOutStream.cy.ts 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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: '16',
  14. askGoodsId: 'BCP001',
  15. entryNumber: null,
  16. productionCode: null,
  17. storageLocationName: null,
  18. userName: 'PDA',
  19. realName: 'PDA测试',
  20. materialId: null,
  21. wbs: '1',
  22. measurementId: null,
  23. num: '1',
  24. outNum: null,
  25. askGoodsCode: 'BCP001',
  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: '瑞银;一体式电表;DJZ1226;600A',
  38. materialCode: '5TK540010437W87',
  39. uniqueCode: null,
  40. storageLocationCode: null,
  41. supplierId: null,
  42. serial: null,
  43. type: null,
  44. userId: '36',
  45. scrq: '2023-04-11 11:11:42',
  46. supplierName: null,
  47. producDate: null,
  48. wllbCode: '5TK540010437W87',
  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: 'CK2304110001',
  64. accountSleeve: '8130',
  65. inventoryId: null,
  66. storageLocationCodeRk: null,
  67. accountName: '青岛特来电智能设备有限公司',
  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/getRemovalHalfProduct', function({reply, search}) {
  80. generateNetworkResult({search, reply, basicData, title: 'askGoodsCode'});
  81. });
  82. exportIntercept('/askGoods/getRemovalHalfProductExcel');
  83. });
  84. it('table', function() {
  85. selectAllFilters('semi_out_stream_filter', 10);
  86. validateTableList('semi_out_stream_table');
  87. validateTableSearch(
  88. 'semi_out_stream_table',
  89. [
  90. 'askGoodsCode',
  91. 'storageCode',
  92. 'wllbCode',
  93. 'materialName',
  94. 'userName',
  95. 'realName',
  96. {id: 'departmentCode', type: 'select', value: '00029999'},
  97. 'wbs',
  98. {id: 'startTime', type: 'date'},
  99. {id: 'accountSleeve', type: 'select', value: '8130'},
  100. ],
  101. {
  102. toolId: 'semi_out_stream_filter',
  103. url: '/askGoods/getRemovalHalfProduct',
  104. },
  105. );
  106. validateExport('semi_out_stream_table');
  107. });
  108. });