Browse Source

备料计划

master
陈薪名 1 year ago
parent
commit
bbe69adb49
  1. 6
      src/api/wms/preparetoissueMain/index.ts
  2. 38
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue
  3. 143
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts

6
src/api/wms/preparetoissueMain/index.ts

@ -66,6 +66,12 @@ export const importTemplate = () => {
return request.download({ url: '/wms/preparetoissue-main/get-import-template' }) 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) => { export const close = (id) => {

38
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['shift'] = val[0]['shift']
setV['team'] = val[0]['team'] setV['team'] = val[0]['team']
isShowButton.value = false isShowButton.value = false
// // getBomDisassemble
ProductionDetailApi.getProductionDetailPage({ // ProductionDetailApi.getProductionDetailPage({
masterId: val[0]['id'], // masterId: val[0]['id'],
pageSize: 100, // pageSize: 100,
pageNo: 1, // pageNo: 1,
sort: '', // sort: '',
by: 'ASC' // by: 'ASC'
}).then(res => { // })
if (res) tableData.value = res.list PreparetoissueMainApi.getBomDisassemble(val[0]['id'])
.then(res => {
if (res) tableData.value = res
// 线 线 // 线 线
tableData.value.map(item => { tableData.value.map(item => {
ProductionlineitemApi.getProductionlineitemPage({ ProductionlineitemApi.getProductionlineitemPage({
@ -230,15 +232,15 @@ const isShowMainButton = (row,val) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5'])}), // defaultButtons.mainListPlanOpeBtn({hide:isShowMainButton(row,['5']),hasPermi:'wms:preparetoissue-main:open'}), //
defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4'])}), // defaultButtons.mainListPlanCloBtn({hide:isShowMainButton(row,['1','2','3','4']),hasPermi:'wms:preparetoissue-main:close'}), //
defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1'])}), // defaultButtons.mainListPlanSubBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:preparetoissue-main:submit'}), //
defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListPlanTurBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:preparetoissue-main:reject'}), //
defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2'])}), // defaultButtons.mainListPlanAppBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:preparetoissue-main:agree'}), //
defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3'])}), // defaultButtons.mainListPlanPubBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:preparetoissue-main:publish'}), //
defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4'])}), // defaultButtons.mainListPlanResBtn({hide:isShowMainButton(row,['4']),hasPermi:'wms:preparetoissue-main:resetting'}), //
defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:update'}), // defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:preparetoissue-main:update'}), //
// defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:production-main:delete'}), // // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:preparetoissue-main:delete'}), //
] ]
} }

143
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 * as ProductionlineitemApi from '@/api/wms/productionlineitem'
import { Productionlineitem } from '@/views/wms/basicDataManage/itemManage/productionlineitem/productionlineitem.data' 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 * as WorkStationApi from '@/api/wms/workstation'
import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data' import { Workstation } from '@/views/wms/basicDataManage/factoryModeling/workstation/workstation.data'
@ -39,7 +36,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'productionPlanNumber', field: 'productionPlanNumber',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 160
}, },
form: { form: {
labelMessage: '同时影响车间 生产线 班组 班次', labelMessage: '同时影响车间 生产线 班组 班次',
@ -49,7 +46,16 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
searchField: 'number', // 查询弹窗赋值字段 searchField: 'number', // 查询弹窗赋值字段
searchTitle: '生产计划信息', // 查询弹窗标题 searchTitle: '生产计划信息', // 查询弹窗标题
searchAllSchemas: ProductionMain.allSchemas, // 查询弹窗所需类 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<CrudSchema[]>([
} }
} }
}, },
{
label: '状态',
field: 'status',
sort: 'custom',
table: {
width: 150
},
dictType: DICT_TYPE.PLAN_STATUS,
dictClass: 'string',
isSearch: true,
form: {
value: '1',
componentProps: {
disabled: true
}
}
},
{ {
label: '计划日期', label: '计划日期',
field: 'planDate', field: 'planDate',
@ -155,27 +178,12 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150, width: 160,
fixed: 'left' fixed: 'left'
}, },
isForm: false, isForm: false,
isSearch: true, isSearch: true,
}, },
{
label: '业务类型',
field: 'businessType',
sort: 'custom',
table: {
width: 150
},
form: {
value: 'Issue',
componentProps: {
disabled: true
}
},
isForm: false,
},
{ {
label: '开始时间', label: '开始时间',
field: 'beginTime', field: 'beginTime',
@ -227,6 +235,41 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isTable: false 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: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',
@ -289,43 +332,6 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isForm: false, 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: '操作', label: '操作',
field: 'action', field: 'action',
@ -481,6 +487,14 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
key:'productionLineCode', key:'productionLineCode',
value:'prodLine', value:'prodLine',
isMainValue: true isMainValue: true
},{
key:'workshopCode',
value:'workshop',
isMainValue: true
},{
key:'available',
value:'TRUE',
isMainValue: false
}] }]
} }
}, },
@ -495,6 +509,14 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
key:'productionLineCode', key:'productionLineCode',
value:'prodLine', value:'prodLine',
isMainValue: true isMainValue: true
},{
key:'workshopCode',
value:'workshop',
isMainValue: true
},{
key:'available',
value:'TRUE',
isMainValue: false
}] }]
}, },
}, },
@ -529,7 +551,7 @@ export const PreparetoissueDetail = useCrudSchemas(reactive<CrudSchema[]>([
field: 'number', field: 'number',
sort: 'custom', sort: 'custom',
table: { table: {
width: 150 width: 160
}, },
form: { form: {
componentProps: { componentProps: {
@ -665,4 +687,7 @@ export const PreparetoissueDetailRules = reactive({
itemCode: [ itemCode: [
{ required: true, message: '请选择物品代码', trigger: 'change' } { required: true, message: '请选择物品代码', trigger: 'change' }
], ],
workStation: [
{ required: true, message: '请选择工位', trigger: 'change' }
],
}) })
Loading…
Cancel
Save