分组修改

This commit is contained in:
GaoHao
2025-04-07 16:15:37 +08:00
parent db05de04a5
commit c0f03ef9aa
5 changed files with 78 additions and 17 deletions

View File

@@ -39,14 +39,13 @@
import editSort from './components/edit-sort.vue';
import editName from './components/edit-name.vue';
import editTime from './components/edit-time.vue';
import { getProdGroupPage, addProdGroup, updateProdGroup, delProdGroup } from '@/http/api/product.js'
import { getProdGroupPage, addProdGroup, updateProdGroup, delProdGroup,editProdGroup } from '@/http/api/product.js'
const pageData = reactive({
showGoodsDetail: false,
query: {
page: 1,
size: 10,
orderBy: 'create_time desc',
},
totalElements: 0,
list: [],
@@ -165,12 +164,14 @@
* @param {Object} e
*/
async function updataGroup(e) {
const res = await updateProdGroup(e)
console.log(e)
const res = await editProdGroup(e)
popup.sort.show = false;
popup.name.show = false;
popup.time.show = false;
pageData.list[popup.selIndex] = e
uni.$utils.showToast('更新成功')
getList()
}
/**
@@ -178,11 +179,11 @@
* @param {Object} data
*/
async function isSHowChange(data) {
const res = await updateProdGroup({
const res = await editProdGroup({
...data
})
uni.$utils.showToast('修改成功')
// init()
uni.$utils.showToast('更新成功')
}