|
@@ -1,4 +1,18 @@
|
|
|
-import {beforeSetup} from './utils';
|
|
|
+import {
|
|
|
+ beforeSetup,
|
|
|
+ generateNetworkResult,
|
|
|
+ intercept,
|
|
|
+ intoMenu,
|
|
|
+ selectAllFilters,
|
|
|
+ selectClick,
|
|
|
+ successIntercept,
|
|
|
+ tableBtnClick,
|
|
|
+ validateDelete,
|
|
|
+ validateModalOperation,
|
|
|
+ validatePut,
|
|
|
+ validateTableList,
|
|
|
+ validateTableSearch,
|
|
|
+} from './utils';
|
|
|
|
|
|
const basicData = {
|
|
|
id: '26',
|
|
@@ -52,5 +66,83 @@ const basicData = {
|
|
|
describe('半成品报工单管理', function () {
|
|
|
beforeEach(function () {
|
|
|
beforeSetup();
|
|
|
+ intoMenu('入库管理', '半成品报工单管理');
|
|
|
+ });
|
|
|
+
|
|
|
+ beforeEach(function () {
|
|
|
+ intercept('/warehousing/getNotice', function ({search, reply}) {
|
|
|
+ generateNetworkResult({
|
|
|
+ search,
|
|
|
+ reply,
|
|
|
+ basicData,
|
|
|
+ title: 'productionCode',
|
|
|
+ skipCondition: name => name === 'partType',
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ successIntercept([
|
|
|
+ '/warehousing/addInventoryNotice',
|
|
|
+ '/warehousing/delInventoryNotice',
|
|
|
+ ]);
|
|
|
+ });
|
|
|
+
|
|
|
+ it('table', function () {
|
|
|
+ selectAllFilters('semi_report_filter', 10);
|
|
|
+ validateTableList('semi_report_table');
|
|
|
+
|
|
|
+ validateTableSearch(
|
|
|
+ 'semi_report_table',
|
|
|
+ [
|
|
|
+ 'productionCode',
|
|
|
+ 'noticeCode',
|
|
|
+ 'materialName',
|
|
|
+ 'wllbCode',
|
|
|
+ {id: 'endTime', type: 'date'},
|
|
|
+ 'entryNumber',
|
|
|
+ {id: 'companyNumber', type: 'select', value: '8130'},
|
|
|
+ 'moveType',
|
|
|
+ 'sourceType',
|
|
|
+ {id: 'type', type: 'select', value: '0'},
|
|
|
+ ],
|
|
|
+ {toolId: 'semi_report_filter', url: '/warehousing/getNotice'},
|
|
|
+ );
|
|
|
+ });
|
|
|
+
|
|
|
+ it('operation', function () {
|
|
|
+ const {validateAdd} = validatePut(
|
|
|
+ 'semi_report_modal',
|
|
|
+ 'semi_report_table',
|
|
|
+ {label: '报工单'},
|
|
|
+ );
|
|
|
+
|
|
|
+ validateAdd([
|
|
|
+ 'stockInNoticeId',
|
|
|
+ 'stockInNoticeNo',
|
|
|
+ 'prodOrderNo',
|
|
|
+ {id: 'materialId', type: 'keySelect'},
|
|
|
+ 'notificationTypeName',
|
|
|
+ 'notificationTypeNumber',
|
|
|
+ {id: 'measUnitId', type: 'keySelect'},
|
|
|
+ {id: 'orderCount', type: 'field', value: '10'},
|
|
|
+ {id: 'companyNo', type: 'keySelect'},
|
|
|
+ 'entryNumber',
|
|
|
+ 'WBS',
|
|
|
+ ]);
|
|
|
+
|
|
|
+ validateDelete('semi_report_table', '半成品报工单', {
|
|
|
+ title: basicData.noticeCode,
|
|
|
+ });
|
|
|
+
|
|
|
+ // 入库操作
|
|
|
+ tableBtnClick('semi_report_table', 0);
|
|
|
+
|
|
|
+ cy.getTestId('semi_report_modal')
|
|
|
+ .find('h3')
|
|
|
+ .should('have.text', '选择库位信息');
|
|
|
+
|
|
|
+ selectClick('field_warehouse');
|
|
|
+ selectClick('field_location');
|
|
|
+
|
|
|
+ validateModalOperation('semi_report_modal', '入库完成');
|
|
|
});
|
|
|
});
|