diff --git a/src/api/wms/preparetoissueMain/index.ts b/src/api/wms/preparetoissueMain/index.ts index 0b3797730..b86b6fcd7 100644 --- a/src/api/wms/preparetoissueMain/index.ts +++ b/src/api/wms/preparetoissueMain/index.ts @@ -66,6 +66,12 @@ export const importTemplate = () => { return request.download({ url: '/wms/preparetoissue-main/get-import-template' }) } +// bom拆解 +export const getBomDisassemble = async (id: number) => { + return await request.get({ url: `/wms/preparetoissue-main/getBomDisassemble?id=` + id }) +} + + // 关闭 export const close = (id) => { diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue index 9154c9ea2..1d8e3d8a5 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue @@ -118,15 +118,17 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => setV['shift'] = val[0]['shift'] setV['team'] = val[0]['team'] isShowButton.value = false - // 获取子表数据 - ProductionDetailApi.getProductionDetailPage({ - masterId: val[0]['id'], - pageSize: 100, - pageNo: 1, - sort: '', - by: 'ASC' - }).then(res => { - if (res) tableData.value = res.list + // 获取子表数据 getBomDisassemble + // ProductionDetailApi.getProductionDetailPage({ + // masterId: val[0]['id'], + // pageSize: 100, + // pageNo: 1, + // sort: '', + // by: 'ASC' + // }) + PreparetoissueMainApi.getBomDisassemble(val[0]['id']) + .then(res => { + if (res) tableData.value = res // 根据子表物品代码 和主表生产线 查询生产线物品关系 获取 原料库位赋值目标库位 tableData.value.map(item => { ProductionlineitemApi.getProductionlineitemPage({ @@ -230,15 +232,15 @@ const isShowMainButton = (row,val) => { // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5'])}), // 打开 - defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4'])}), // 关闭 - defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1'])}), // 提交审批 - defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2'])}), // 驳回 - defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2'])}), // 审批通过 - defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3'])}), // 发布 - defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4'])}), // 重置 - defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:update'}), // 编辑 - // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:delete'}), // 删除 + defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:preparetoissue-main:open'}), // 打开 + defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:preparetoissue-main:close'}), // 关闭 + defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:preparetoissue-main:submit'}), // 提交审批 + defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:preparetoissue-main:reject'}), // 驳回 + defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:preparetoissue-main:agree'}), // 审批通过 + defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:preparetoissue-main:publish'}), // 发布 + defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:'wms:preparetoissue-main:resetting'}), // 重置 + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:preparetoissue-main:update'}), // 编辑 + // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:preparetoissue-main:delete'}), // 删除 ] } diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts index c9b420296..96c1023b4 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts @@ -19,9 +19,6 @@ import { Team } from '@/views/wms/basicDataManage/orderManage/team/team.data' import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' -import * as LocationApi from '@/api/wms/location' -import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' - import * as WorkStationApi from '@/api/wms/workstation' import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' @@ -39,7 +36,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ field: 'productionPlanNumber', sort: 'custom', table: { - width: 150 + width: 160 }, form: { labelMessage: '同时影响车间 生产线 班组 班次', @@ -49,7 +46,16 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ searchField: 'number', // 查询弹窗赋值字段 searchTitle: '生产计划信息', // 查询弹窗标题 searchAllSchemas: ProductionMain.allSchemas, // 查询弹窗所需类 - searchPage: ProductionMainApi.getProductionMainPage // 查询弹窗所需分页方法 + searchPage: ProductionMainApi.getProductionMainPage, // 查询弹窗所需分页方法 + searchCondition: [{ + key:'status', + value:'6', + isMainValue: false + },{ + key:'available', + value:'TRUE', + isMainValue: false + }] } } }, @@ -129,6 +135,23 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ } } }, + { + label: '状态', + field: 'status', + sort: 'custom', + table: { + width: 150 + }, + dictType: DICT_TYPE.PLAN_STATUS, + dictClass: 'string', + isSearch: true, + form: { + value: '1', + componentProps: { + disabled: true + } + } + }, { label: '计划日期', field: 'planDate', @@ -155,27 +178,12 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ field: 'number', sort: 'custom', table: { - width: 150, + width: 160, fixed: 'left' }, isForm: false, isSearch: true, }, - { - label: '业务类型', - field: 'businessType', - sort: 'custom', - table: { - width: 150 - }, - form: { - value: 'Issue', - componentProps: { - disabled: true - } - }, - isForm: false, - }, { label: '开始时间', field: 'beginTime', @@ -227,6 +235,41 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ }, isTable: false }, + { + label: '是否可用', + field: 'available', + dictType: DICT_TYPE.TRUE_FALSE, + dictClass: 'string', + isSearch: true, + isTable: true, + sort: 'custom', + table: { + width: 150 + }, + form: { + component: 'Switch', + value: 'TRUE', + componentProps: { + inactiveValue: 'FALSE', + activeValue: 'TRUE' + } + } + }, + { + label: '业务类型', + field: 'businessType', + sort: 'custom', + table: { + width: 150 + }, + form: { + value: 'Issue', + componentProps: { + disabled: true + } + }, + isForm: false, + }, { label: '创建时间', field: 'createTime', @@ -289,43 +332,6 @@ export const PreparetoissueMain = useCrudSchemas(reactive([ }, isForm: false, }, - { - label: '状态', - field: 'status', - sort: 'custom', - table: { - width: 150 - }, - dictType: DICT_TYPE.PLAN_STATUS, - dictClass: 'string', - isSearch: true, - form: { - value: '1', - componentProps: { - disabled: true - } - } - }, - { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, - dictClass: 'string', - isSearch: true, - isTable: true, - sort: 'custom', - table: { - width: 150 - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } - } - }, { label: '操作', field: 'action', @@ -481,6 +487,14 @@ export const PreparetoissueDetail = useCrudSchemas(reactive([ key:'productionLineCode', value:'prodLine', isMainValue: true + },{ + key:'workshopCode', + value:'workshop', + isMainValue: true + },{ + key:'available', + value:'TRUE', + isMainValue: false }] } }, @@ -495,6 +509,14 @@ export const PreparetoissueDetail = useCrudSchemas(reactive([ key:'productionLineCode', value:'prodLine', isMainValue: true + },{ + key:'workshopCode', + value:'workshop', + isMainValue: true + },{ + key:'available', + value:'TRUE', + isMainValue: false }] }, }, @@ -529,7 +551,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive([ field: 'number', sort: 'custom', table: { - width: 150 + width: 160 }, form: { componentProps: { @@ -665,4 +687,7 @@ export const PreparetoissueDetailRules = reactive({ itemCode: [ { required: true, message: '请选择物品代码', trigger: 'change' } ], + workStation: [ + { required: true, message: '请选择工位', trigger: 'change' } + ], }) \ No newline at end of file