otherOut.cy.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. import {
  2. beforeSetup,
  3. generateNetworkResult,
  4. intercept,
  5. intoMenu,
  6. selectAllFilters,
  7. successIntercept,
  8. validateDelete,
  9. validateTableList,
  10. validateTableSearch,
  11. } from './utils';
  12. const basicData = {
  13. id: '28',
  14. askGoodsId: '00000000000000040445',
  15. entryNumber: null,
  16. productionCode: null,
  17. storageLocationName: null,
  18. userName: null,
  19. realName: null,
  20. materialId: '00000000000000057928',
  21. wbs: '00000000000007160127',
  22. measurementId: '00000000000000000001',
  23. num: '1.0',
  24. outNum: '1',
  25. askGoodsCode: '710202301310003',
  26. companyNumber: '8130',
  27. companyCode: null,
  28. sqrq: '2023-01-31',
  29. departmentId: null,
  30. departmentName: null,
  31. department: '充电箱变产线',
  32. departmentCode: null,
  33. name: null,
  34. code: null,
  35. sourceType: '8',
  36. moveType: '209',
  37. materialName: '箱变非金属顶盖-左侧端盖总成1;5T.X22.000.0003',
  38. materialCode: '5TX220000003',
  39. uniqueCode: null,
  40. storageLocationCode: null,
  41. supplierId: null,
  42. serial: null,
  43. type: null,
  44. userId: null,
  45. scrq: null,
  46. supplierName: null,
  47. producDate: null,
  48. wllbCode: null,
  49. page: 0,
  50. limit: 0,
  51. askGoodsType: null,
  52. startTime: null,
  53. endTime: null,
  54. process: null,
  55. askGoodsApplyType: null,
  56. partType: '半成品',
  57. attribute: null,
  58. deliveryId: null,
  59. deliveryCode: null,
  60. customerName: null,
  61. customerCode: null,
  62. warehouseWhere: null,
  63. companyName: '青岛特来电智能设备有限公司',
  64. storageCode: null,
  65. accountSleeve: null,
  66. inventoryId: null,
  67. storageLocationCodeRk: null,
  68. accountName: null,
  69. requestTypeNumber: 'Z09',
  70. requestTypeName: '其他发货通知_青岛工厂',
  71. ifCommodity: '0',
  72. amount: null,
  73. };
  74. describe('其他出库', function () {
  75. beforeEach(function () {
  76. beforeSetup();
  77. intoMenu('出库管理', '其他出库');
  78. });
  79. beforeEach(function () {
  80. intercept('/queryList/getOtherShipments', function ({search, reply}) {
  81. generateNetworkResult({reply, search, basicData, title: 'askGoodsCode'});
  82. });
  83. successIntercept('/warehousing/delOtherShipments');
  84. });
  85. it('table', function () {
  86. selectAllFilters('other_out_filter', 8);
  87. validateTableList('other_out_table');
  88. validateTableSearch(
  89. 'other_out_table',
  90. [
  91. 'askGoodsCode',
  92. 'materialCode',
  93. 'materialName',
  94. {id: 'startTime', type: 'date'},
  95. {id: 'companyNumber', type: 'select', value: '8130'},
  96. 'wbs',
  97. {id: 'departmentCode', type: 'select', value: '00029999'},
  98. {id: 'type', type: 'select', value: '1'},
  99. ],
  100. {
  101. toolId: 'other_out_filter',
  102. url: '/queryList/getOtherShipments',
  103. },
  104. );
  105. });
  106. it('opertaion', function () {
  107. validateDelete('other_out_table', '其他出库', {eq: 0, title: 'page-1'});
  108. });
  109. });