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

View File

@ -3,7 +3,7 @@
<div class="mod-takeout__dish}">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<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-button @click="getDataList()">{{ $t('query') }}</el-button>
@ -112,7 +112,8 @@ export default {
order: 'desc',
orderField: 'update_date',
dataForm: {
id: ''
//
name: ''
}
}
},

View File

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