原料商品添加goodsType

This commit is contained in:
zzyuan 2025-06-30 14:20:44 +08:00
parent d86c765ea5
commit faac0ad728
6 changed files with 30 additions and 5 deletions

View File

@ -103,7 +103,7 @@ export const constantRoutes = [
]
},
{
path: '/dish',
path: '/canteen/dish',
component: Layout,
hidden: true,
redirect: 'noredirect',
@ -121,7 +121,28 @@ export const constantRoutes = [
meta: { title: '菜谱编辑', icon: '' }
},
]
},
{
path: '/foodManage/purchaseManage',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'contractDetail',
component: () => import('@/views/foodManage/purchaseManage/contractList/detail'),
name: 'ContractDetail',
meta: { title: '合同详情', icon: '' }
},
{
path: 'contractEdit',
component: () => import('@/views/foodManage/purchaseManage/contractList/edit'),
name: 'ContractEdit',
meta: { title: '合同新增/编辑', icon: '' }
},
]
}
]
// 动态路由,基于用户权限动态去加载

View File

@ -583,12 +583,14 @@ export default {
/** 处理对话框提交 */
handleDialogSubmit(formData) {
if (this.title === "新增") {
formData.goodsType=1
addMaterialApi(formData).then(response => {
this.$modal.msgSuccess("新增成功");
this.dialogVisible = false;
this.getList();
});
} else {
formData.goodsType=1
updateMaterialApi(formData).then(response => {
this.$modal.msgSuccess("修改成功");
this.dialogVisible = false;

View File

@ -619,7 +619,7 @@ export default {
// 2.detailList,detailList
//
jumpList() {
const obj = { path: "/dish/menuDetail" };
const obj = { path: "/canteen/dish/menuDetail" };
this.$tab.closeOpenPage(obj);
this.$router.replace({ path: "/canteen/dish/menu" }); //
},

View File

@ -799,7 +799,7 @@ export default {
},
//
jumpList() {
const obj = { path: "/dish/menuDetail" };
const obj = { path: "/canteen/dish/menuDetail" };
this.$tab.closeOpenPage(obj);
this.$router.replace({ path: "/canteen/dish/menu" }); //
},

View File

@ -532,7 +532,7 @@
/** 新增按钮操作 */
handleAdd() {
this.$router.push({ path: "/dish/menuDetail" });
this.$router.push({ path: "/canteen/dish/menuDetail" });
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -542,7 +542,7 @@
// getPageRecipeListApi(param).then(response => {
// let obj = response.rows[0]
this.$router.push({ path: "/dish/menuEdit",query: {pageJson:JSON.stringify(row)} });
this.$router.push({ path: "/canteen/dish/menuEdit",query: {pageJson:JSON.stringify(row)} });
// });
},
/** 查看设备 */

View File

@ -574,12 +574,14 @@ export default {
/** 处理对话框提交 */
handleDialogSubmit(formData) {
if (this.title === "新增") {
formData.goodsType=2
addMaterialApi(formData).then(response => {
this.$modal.msgSuccess("新增成功");
this.dialogVisible = false;
this.getList();
});
} else {
formData.goodsType=2
updateMaterialApi(formData).then(response => {
this.$modal.msgSuccess("修改成功");
this.dialogVisible = false;