Browse Source

备料计划 修改

master_hella_20240701
陈薪名 9 months ago
parent
commit
a04635bb4b
  1. 2
      src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts
  2. 31
      src/views/wms/productionManage/productionplan/productionMain/index.vue

2
src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/preparetoissueMain.data.ts

@ -409,7 +409,7 @@ export const PreparetoissueMain = useCrudSchemas(reactive<CrudSchema[]>([
isDetail: false,
isForm: false,
table: {
width: 300,
width: 220,
fixed: 'right'
},
}

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

@ -232,11 +232,7 @@ const butttondata = (row) => {
const buttonTableClick = async (val, row) => {
if (val == 'mainPlanOpe') { //
tableObject.loading = true
await ProductionMainApi.open(row.id).then(async () => {
await ProductionMainApi.generateRequest(row.number).then(() => {
}).catch(err => {
console.log(err)
})
await ProductionMainApi.open(row.id).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -259,11 +255,7 @@ const buttonTableClick = async (val, row) => {
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要提交审批吗?')
tableObject.loading = true
await ProductionMainApi.submit(row.id).then(async () => {
await ProductionMainApi.generateRequest(row.number).then(() => {
}).catch(err => {
console.log(err)
})
await ProductionMainApi.submit(row.id).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -286,11 +278,7 @@ const buttonTableClick = async (val, row) => {
if (row.available == 'FALSE') return message.warning('当前数据:【不可用】')
await message.confirm('确认要审批通过吗?')
tableObject.loading = true
await ProductionMainApi.agree(row.id).then(async () => {
await ProductionMainApi.generateRequest(row.number).then(() => {
}).catch(err => {
console.log(err)
})
await ProductionMainApi.agree(row.id).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -318,11 +306,7 @@ const buttonTableClick = async (val, row) => {
return
}
tableObject.loading = true
await ProductionMainApi.publish(row.id).then(async () => {
await ProductionMainApi.generateRequest(row.number).then(() => {
}).catch(err => {
console.log(err)
})
await ProductionMainApi.publish(row.id).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
@ -460,12 +444,7 @@ const submitForm = async (formType, data) => {
try {
if (formType === 'create') {
data.subList = tableData.value //
await ProductionMainApi.createProductionMain(data).then(async res => {
await ProductionMainApi.generateRequest(res).catch(err => {
formRef.value.formLoading = false
console.log(err)
})
})
await ProductionMainApi.createProductionMain(data)
message.success(t('common.createSuccess'))
} else {
await ProductionMainApi.updateProductionMain(data)

Loading…
Cancel
Save