Browse Source

生产计划 发布 修改

master
陈薪名 10 months ago
parent
commit
54348e230b
  1. 5
      src/api/wms/productionMain/index.ts
  2. 16
      src/views/wms/productionManage/productionplan/productionMain/index.vue

5
src/api/wms/productionMain/index.ts

@ -33,6 +33,11 @@ export const getProductionMainPage = async (params) => {
} }
} }
// 查询生产计划子表数据不可用物料
export const getProductionDetail = async (id: number) => {
return await request.get({ url: `/wms/production-main/getDetailByAvailable?id=` + id })
}
// 查询生产计划主详情 // 查询生产计划主详情
export const getProductionMain = async (id: number) => { export const getProductionMain = async (id: number) => {
return await request.get({ url: `/wms/production-main/get?id=` + id }) return await request.get({ url: `/wms/production-main/get?id=` + id })

16
src/views/wms/productionManage/productionplan/productionMain/index.vue

@ -279,6 +279,22 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'mainPlanPub') { // } else if (val == 'mainPlanPub') { //
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】') if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要发布吗?') await message.confirm('确认要发布吗?')
//
let isAvailable = true
await ProductionMainApi.getProductionDetail(row.id).then(async res =>{
if (res.length > 0) {
let rs = ''
res.forEach(item => {
rs += item.itemCode + ','
})
await message.confirm('物料:【'+rs +'】目前为不可用状态,是否继续发布?').catch(() => {
isAvailable = false
})
}
})
if (!isAvailable) {
return
}
tableObject.loading = true tableObject.loading = true
ProductionMainApi.publish(row.id).then(() => { ProductionMainApi.publish(row.id).then(() => {
message.success(t('common.updateSuccess')) message.success(t('common.updateSuccess'))

Loading…
Cancel
Save