商品上下架和删除bug修改

This commit is contained in:
liang.chao 2024-11-27 17:44:58 +08:00
parent d3d3907eb2
commit 89fa822ca5
2 changed files with 172 additions and 171 deletions

View File

@ -32,7 +32,7 @@ export const getCompanyListApi = () => {
// 删除接口 // 删除接口
export const removeDeviceApi = (data: any) => { export const removeDeviceApi = (data: any) => {
return post('/zlpt-equip/dev/remove', data) return post('/material-mall/dev/remove', data)
} }
// 上下架(批量) // 上下架(批量)

View File

@ -112,7 +112,6 @@
console.log(queryParams.value.pageNum, '***9999', queryParams.value.pageSize) console.log(queryParams.value.pageNum, '***9999', queryParams.value.pageSize)
const res: any = await getEquipmentListApi(queryParams.value) const res: any = await getEquipmentListApi(queryParams.value)
console.log(res, '列表数据**--**') console.log(res, '列表数据**--**')
total.value = res.total total.value = res.total
tableData.value = res.rows.filter((item: any) => item !== null) tableData.value = res.rows.filter((item: any) => item !== null)
} }
@ -170,7 +169,8 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}).then(() => { }).then(() => {
const res: any = removeDeviceApi([row.maId]) return removeDeviceApi([row.maId])
}).then((res) => {
if (res.code === 200) { if (res.code === 200) {
ElMessage({ ElMessage({
type: 'success', type: 'success',
@ -236,13 +236,14 @@
ElMessage({type: 'error',message: '请选择要操作的数据'}) ElMessage({type: 'error',message: '请选择要操作的数据'})
return return
} }
const res: any = updateUpDownApi({maIds,maStatus}) return updateUpDownApi({maIds,maStatus})
if (res.code === 200) { }).then((res) => {
if (res.code == 200) {
ElMessage({ ElMessage({
type: 'success', type: 'success',
message: '操作成功' message: '操作成功'
}) })
queryTableList() getList()
} }
}).catch(() => {}) }).catch(() => {})
} }
@ -736,8 +737,8 @@
<el-table-column align="center" label="装备状态" width="80px"> <el-table-column align="center" label="装备状态" width="80px">
<template #default="{ row }"> <template #default="{ row }">
<el-tag v-if="row.maStatus == 0" size="small" type="info">草稿状态</el-tag> <el-tag v-if="row.maStatus == 0" size="small" type="info">草稿状态</el-tag>
<el-tag v-if="row.maStatus == 1" size="small" type="warning"></el-tag> <el-tag v-if="row.maStatus == 1" size="small" type="warning"></el-tag>
<el-tag v-if="row.maStatus == 2" size="small" type="success"></el-tag> <el-tag v-if="row.maStatus == 2" size="small" type="success"></el-tag>
<el-tag v-if="row.maStatus == 3" size="small" type="danger">在租</el-tag> <el-tag v-if="row.maStatus == 3" size="small" type="danger">在租</el-tag>
</template> </template>
</el-table-column> </el-table-column>