运检食堂代码修改
This commit is contained in:
parent
bb4452de91
commit
d55f8c5277
|
|
@ -67,6 +67,12 @@ Vue.use(plugins)
|
||||||
Vue.use(VueMeta)
|
Vue.use(VueMeta)
|
||||||
DictData.install()
|
DictData.install()
|
||||||
|
|
||||||
|
// ============ 运检站食堂项目 ============
|
||||||
|
import request from '@/utils/request'
|
||||||
|
window.axios = request
|
||||||
|
|
||||||
|
|
||||||
|
// ============ 运检站食堂项目end ============
|
||||||
/**
|
/**
|
||||||
* If you don't want to use mock-server
|
* If you don't want to use mock-server
|
||||||
* you want to use MockJs for mock api
|
* you want to use MockJs for mock api
|
||||||
|
|
|
||||||
|
|
@ -391,9 +391,9 @@ export default {
|
||||||
this.activeTab = 'list';
|
this.activeTab = 'list';
|
||||||
this.activeLabel = '菜谱添加';
|
this.activeLabel = '菜谱添加';
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.reset();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.reset();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,6 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container" >
|
||||||
<!-- 个人积分补贴 -->
|
<!-- 个人积分补贴 -->
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px" style="width: 600px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px" style="width: 600px">
|
||||||
|
|
||||||
|
|
@ -129,6 +129,9 @@ export default {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
|
.app-container{
|
||||||
|
height: 70vh !important;
|
||||||
|
overflow: visible;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -381,16 +381,12 @@ export default {
|
||||||
this.$message.error('数量限制不能为0');
|
this.$message.error('数量限制不能为0');
|
||||||
return
|
return
|
||||||
}*/
|
}*/
|
||||||
if (this.form.quantityRestriction === '无限制') {
|
if (this.form.quantityRestriction === '无限制' || this.form.quantityRestriction === '') {
|
||||||
this.form.quantityRestriction = null;
|
this.form.quantityRestriction = null;
|
||||||
}
|
}
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.form.quantityRestriction = this.form.quantityRestriction ? this.form.quantityRestriction : 0;
|
// 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 = this.form.quantityRestriction === null;
|
||||||
this.form.unlimited = true;
|
|
||||||
} else {
|
|
||||||
this.form.unlimited = false;
|
|
||||||
}
|
|
||||||
const formObj = this.form
|
const formObj = this.form
|
||||||
formObj.createBy = null
|
formObj.createBy = null
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
|
|
@ -398,6 +394,7 @@ export default {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$message.success("修改成功");
|
this.$message.success("修改成功");
|
||||||
this.$refs.menuList.getList();
|
this.$refs.menuList.getList();
|
||||||
|
this.resetForm();
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
|
|
@ -407,12 +404,13 @@ export default {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
this.$message.success("新增成功");
|
this.$message.success("新增成功");
|
||||||
this.$refs.menuList.getList();
|
this.$refs.menuList.getList();
|
||||||
|
this.resetForm();
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.msg);
|
this.$message.error(res.msg);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.resetForm();
|
|
||||||
/*
|
/*
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.menuList.getList();
|
this.$refs.menuList.getList();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue