productOutStream.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: '1',
  14. deliveryCode: '1234',
  15. askGoodsId: null,
  16. entryNumber: null,
  17. productionCode: null,
  18. storageLocationName: null,
  19. userName: 'admin',
  20. realName: '超管',
  21. materialId: null,
  22. wbs: '1',
  23. measurementId: null,
  24. num: '100',
  25. outNum: null,
  26. askGoodsCode: null,
  27. companyNumber: '8130',
  28. companyCode: null,
  29. sqrq: null,
  30. departmentId: null,
  31. departmentName: null,
  32. department: null,
  33. departmentCode: null,
  34. name: null,
  35. code: null,
  36. sourceType: null,
  37. moveType: null,
  38. materialName: '汽车充电终端;6M;250A;落地式;带急停;双枪;A3系列;标准版2',
  39. materialCode: '3907060140040522',
  40. uniqueCode: null,
  41. storageLocationCode: null,
  42. supplierId: null,
  43. serial: null,
  44. type: null,
  45. userId: '3',
  46. scrq: '2022-10-09',
  47. supplierName: null,
  48. producDate: null,
  49. wllbCode: '3907060140040522',
  50. page: 0,
  51. limit: 0,
  52. askGoodsType: null,
  53. startTime: null,
  54. endTime: null,
  55. process: null,
  56. askGoodsApplyType: null,
  57. partType: null,
  58. attribute: null,
  59. deliveryId: '1',
  60. customerName: '西安特来电智能充电科技有限公司',
  61. customerCode: 'EC00276',
  62. warehouseWhere: null,
  63. companyName: '青岛特来电智能设备有限公司',
  64. storageCode: 'BH741203309',
  65. accountSleeve: null,
  66. inventoryId: null,
  67. storageLocationCodeRk: null,
  68. accountName: null,
  69. requestTypeNumber: null,
  70. requestTypeName: null,
  71. ifCommodity: null,
  72. amount: null,
  73. };
  74. describe('销售发货明细', function () {
  75. beforeEach(function () {
  76. beforeSetup();
  77. intoMenu('出库管理', '销售发货明细');
  78. });
  79. beforeEach(function () {
  80. intercept('/askGoods/getRemovalHalf', function ({reply, search}) {
  81. generateNetworkResult({search, reply, basicData, title: 'deliveryCode'});
  82. });
  83. exportIntercept('/askGoods/getRemovalHalfExcel');
  84. });
  85. it('table', function () {
  86. selectAllFilters('product_out_stream_filter', 10);
  87. validateTableList('product_out_stream_table');
  88. validateTableSearch(
  89. 'product_out_stream_table',
  90. [
  91. 'deliveryCode',
  92. 'storageCode',
  93. 'wllbCode',
  94. 'materialName',
  95. 'userName',
  96. 'realName',
  97. 'wbs',
  98. {id: 'companyCode', type: 'select', value: '8130'},
  99. {id: 'customerCode', type: 'select', value: 'EC92255'},
  100. {id: 'startTime', type: 'date'},
  101. ],
  102. {
  103. toolId: 'product_out_stream_filter',
  104. url: '/askGoods/getRemovalHalf',
  105. },
  106. );
  107. validateExport('product_out_stream_table');
  108. });
  109. });