|
|
@@ -606,11 +606,31 @@
|
|
|
}
|
|
|
|
|
|
await releaseSave(data)
|
|
|
- .then(() => {
|
|
|
- this.$message.success('发布成功!');
|
|
|
- this.$router.push({
|
|
|
- path: '/productionPlan'
|
|
|
- });
|
|
|
+ .then((res) => {
|
|
|
+ if (res === 1) {
|
|
|
+ this.$message.success('工单已发布!');
|
|
|
+ this.$router.push({
|
|
|
+ path: '/productionPlan'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ this.$confirm(
|
|
|
+ '生产计划创建成功,但工单发布失败。请前往【生产计划】列表【重新发布】工单',
|
|
|
+ '提示',
|
|
|
+ {
|
|
|
+ confirmButtonText: '返回',
|
|
|
+ cancelButtonText: '立即前往',
|
|
|
+ type: 'warning'
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(() => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/productionPlan'
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$router.go(-1);
|
|
|
+ });
|
|
|
+ }
|
|
|
removePageTab({ key });
|
|
|
})
|
|
|
.catch(() => {
|