|
|
@ -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) |
|
|
|