运检食堂代码修改

This commit is contained in:
zzyuan 2025-06-16 16:06:33 +08:00
parent bb4452de91
commit d55f8c5277
5 changed files with 20 additions and 13 deletions

View File

@ -67,6 +67,12 @@ Vue.use(plugins)
Vue.use(VueMeta)
DictData.install()
// ============ 运检站食堂项目 ============
import request from '@/utils/request'
window.axios = request
// ============ 运检站食堂项目end ============
/**
* If you don't want to use mock-server
* you want to use MockJs for mock api

View File

@ -391,9 +391,9 @@ export default {
this.activeTab = 'list';
this.activeLabel = '菜谱添加';
this.getList();
this.reset();
}
});
this.reset();
}
});
},

View File

@ -71,6 +71,6 @@ export default {
}
</script>
<style scoped>
<style scoped lang="scss">
</style>

View File

@ -1,5 +1,5 @@
<template>
<div class="app-container">
<div class="app-container" >
<!-- 个人积分补贴 -->
<el-form ref="form" :model="form" :rules="rules" label-width="100px" style="width: 600px">
@ -129,6 +129,9 @@ export default {
}
</script>
<style scoped>
<style scoped lang="scss">
.app-container{
height: 70vh !important;
overflow: visible;
}
</style>

View File

@ -381,16 +381,12 @@ export default {
this.$message.error('数量限制不能为0');
return
}*/
if (this.form.quantityRestriction === '无限制') {
if (this.form.quantityRestriction === '无限制' || this.form.quantityRestriction === '') {
this.form.quantityRestriction = null;
}
if (valid) {
this.form.quantityRestriction = this.form.quantityRestriction ? this.form.quantityRestriction : 0;
if (this.form.quantityRestriction === 0 || !this.form.quantityRestriction || this.form.quantityRestriction === null) {
this.form.unlimited = true;
} else {
this.form.unlimited = false;
}
// this.form.quantityRestriction = this.form.quantityRestriction ? this.form.quantityRestriction : 0;
this.form.unlimited = this.form.quantityRestriction === null;
const formObj = this.form
formObj.createBy = null
if (this.form.id != null) {
@ -398,6 +394,7 @@ export default {
if (res.code === 200) {
this.$message.success("修改成功");
this.$refs.menuList.getList();
this.resetForm();
} else {
this.$message.error(res.msg);
}
@ -407,12 +404,13 @@ export default {
if (res.code === 200) {
this.$message.success("新增成功");
this.$refs.menuList.getList();
this.resetForm();
} else {
this.$message.error(res.msg);
}
})
}
this.resetForm();
/*
this.$nextTick(() => {
this.$refs.menuList.getList();