6/19 解决了菜品/套餐页面修改窗口无法关闭和套餐页面状态默认值为空的问题,修复了菜品页面搜索按钮

This commit is contained in:
zyx 2023-06-19 16:39:48 +08:00
parent a6c2d28cdc
commit 3c6d870d62
3 changed files with 12 additions and 12 deletions

View File

@ -269,7 +269,7 @@ export default {
}, },
init() { init() {
this.visible = true, this.visible = true
this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}` this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}`
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields() this.$refs['dataForm'].resetFields()
@ -292,11 +292,11 @@ export default {
...res.data ...res.data
} }
this.dataForm.price = String(res.data.price / 100) this.dataForm.price = String(res.data.price / 100)
this.dishFlavors = res.data.flavors && res.data.flavors.map(obj => ({ // this.dishFlavors = res.data.flavors && res.data.flavors.map(obj => ({
...obj, // ...obj,
value: JSON.parse(obj.value), // value: JSON.parse(obj.value),
showOption: false // showOption: false
})) // }))
this.imageUrl = this.dataForm.image; this.imageUrl = this.dataForm.image;
}).catch(() => { }).catch(() => {
@ -454,7 +454,6 @@ export default {
onClose: () => { onClose: () => {
this.visible = false this.visible = false
this.$emit('refreshDataList') this.$emit('refreshDataList')
} }
}) })
}).catch(() => { }).catch(() => {

View File

@ -3,7 +3,7 @@
<div class="mod-takeout__dish}"> <div class="mod-takeout__dish}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item> <el-form-item>
<el-input v-model="dataForm.id" placeholder="菜品名称" clearable></el-input> <el-input v-model="dataForm.name" placeholder="菜品名称" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button> <el-button @click="getDataList()">{{ $t('query') }}</el-button>
@ -112,7 +112,8 @@ export default {
order: 'desc', order: 'desc',
orderField: 'update_date', orderField: 'update_date',
dataForm: { dataForm: {
id: '' //
name: ''
} }
} }
}, },

View File

@ -199,7 +199,7 @@ export default {
image: '', image: '',
description: '', description: '',
dishList: [], dishList: [],
status: '1', status: 1,
idType: '', idType: '',
}, },
headerObj: { headerObj: {
@ -300,8 +300,8 @@ export default {
this.dataForm.price = res.data.price / 100 this.dataForm.price = res.data.price / 100
this.imageUrl = this.dataForm.image; this.imageUrl = this.dataForm.image;
this.checkList = res.data.setmealDishes // this.checkList = res.data.setmealDishes
this.dishTable = res.data.setmealDishes // this.dishTable = res.data.setmealDishes
this.dataForm.idType = res.data.categoryId this.dataForm.idType = res.data.categoryId
}).catch(() => { }).catch(() => {
}) })