productOutStream.cy.ts 3.0 KB

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