11
This commit is contained in:
1 parent
5ce9a2a489
commit
b66b399a17
4 files changed
+25
-7
No files matched your search
@@ -68,7 +68,6 @@
|
||||
<el-table-column prop="isTakeFood" width="200" label="是否为当前商户的取餐机器">
|
||||
<template #default="{ row }">
|
||||
<el-switch
|
||||
v-if="row.type == 1"
|
||||
:disabled="!useUserInfo().userInfos.roleCodes.includes('ROLE_ADMIN')"
|
||||
:loading="switchTakeFoodLoading"
|
||||
active-text="是"
|
||||
@@ -78,7 +77,6 @@
|
||||
v-model="row.isTakeFood"
|
||||
@change="changeTakeFood($event, row)"
|
||||
/>
|
||||
<div v-else>只有超市需要设置</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" width="200" label="创建时间" />
|
||||
@@ -156,10 +154,18 @@ const resetQuery = () => {
|
||||
const changeTakeFood = async (e: any, row: any) => {
|
||||
switchTakeFoodLoading.value = true
|
||||
try {
|
||||
await hardManageApi.putObj({ id: row.id, isTakeFood: e })
|
||||
getDataList()
|
||||
const pa = {
|
||||
id: row.id,
|
||||
merchantId: row.merchantId,
|
||||
isTakeFood: e,
|
||||
}
|
||||
await hardManageApi.putObj(pa)
|
||||
} catch (error: any) {
|
||||
console.error(error)
|
||||
useMessage().error(error.msg)
|
||||
} finally {
|
||||
switchTakeFoodLoading.value = false
|
||||
getDataList()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user