update 配方详情页面
This commit is contained in:
@@ -2,13 +2,13 @@
|
||||
<template>
|
||||
<div class="list-view">
|
||||
<el-row>
|
||||
<a style="margin: 0 0 16px 0; color: #0b58ff; display: flex; align-items: center; text-decoration: none; cursor: pointer;" title="返回上一页">
|
||||
<span style="margin-right: 6px;">
|
||||
<a style="margin: 0 0 16px 0; color: #0b58ff; display: flex; align-items: center; text-decoration: none; cursor: pointer" title="返回上一页" @click.prevent="$router.go(-1)">
|
||||
<span style="margin-right: 6px">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3" />
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M9 15L3 9m0 0l6-6M3 9h12a6 6 0 010 12h-3" />
|
||||
</svg>
|
||||
</span>
|
||||
<span style="line-height: 20px;">返回</span>
|
||||
<span style="line-height: 24px">返回</span>
|
||||
</a>
|
||||
</el-row>
|
||||
|
||||
@@ -298,6 +298,16 @@ export default {
|
||||
this.openDialog(data, true, { key: "attr" });
|
||||
break;
|
||||
}
|
||||
case "to-bom-detail": {
|
||||
// console.log('to-bom-detail', data.name)
|
||||
// 查看配方详情
|
||||
return this.$router.push({
|
||||
name: 'pms-bomDetails',
|
||||
query: {
|
||||
name: data.name
|
||||
}
|
||||
});
|
||||
}
|
||||
case "copy": {
|
||||
return this.$http
|
||||
.post(this.urls.copyUrl, data, {
|
||||
@@ -391,6 +401,32 @@ export default {
|
||||
}
|
||||
});
|
||||
}
|
||||
case "sync": {
|
||||
// 同步配方详情
|
||||
return this.$http
|
||||
.post(this.urls.syncUrl, data, { headers: { "Content-Type": "application/json" } })
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
this.$message({
|
||||
message: "同步成功",
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.getList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
throw new Error(res.msg);
|
||||
}
|
||||
})
|
||||
.catch((errMsg) => {
|
||||
this.$message({
|
||||
message: "同步失败: " + errMsg,
|
||||
type: "error",
|
||||
duration: 1500,
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -486,9 +522,9 @@ export default {
|
||||
}
|
||||
|
||||
.w-6 {
|
||||
width: 18px;
|
||||
width: 16px;
|
||||
}
|
||||
.h-6 {
|
||||
height: 18px;
|
||||
height: 16px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -295,6 +295,16 @@ export default {
|
||||
this.openDialog(data, true, { key: "attr" });
|
||||
break;
|
||||
}
|
||||
case "to-bom-detail": {
|
||||
// console.log('to-bom-detail', data.name)
|
||||
// 查看配方详情
|
||||
return this.$router.push({
|
||||
name: 'pms-bomDetails',
|
||||
query: {
|
||||
name: data.name
|
||||
}
|
||||
});
|
||||
}
|
||||
case "copy": {
|
||||
return this.$http
|
||||
.post(this.urls.copyUrl, data, {
|
||||
|
||||
Reference in New Issue
Block a user