更新商品管理模块

This commit is contained in:
2024-09-28 15:07:09 +08:00
parent 3c7918211e
commit 587965020b
11 changed files with 642 additions and 532 deletions

View File

@@ -41,7 +41,7 @@
<view class="goods-list u-p-30">
<template v-if="pageData.goodsList.length">
<view class="u-m-b-32" v-for="(item,index) in pageData.goodsList" :key="index">
<my-goods @changePrice="changePriceShow" @changeClick="goodsChangeClick"
<my-goods :key="item.id" @update="getGoodsList" @changePrice="changePriceShow" @changeClick="goodsChangeClick"
@editStock="changeStockShow" @guigeClick="editGuigeShow" @baosun="baosunShow"
@radioClick="goodsRadioClick" :index="index" :data="item" @del="goodsDel"
:showChecked="showChecked" :showDetail="pageData.showGoodsDetail"></my-goods>
@@ -187,7 +187,9 @@
page: 0,
size: 10,
categoryId: '',
name: ''
name: '',
isPauseSale:'',
isGrounding:''
},
category: '',
categoryList: [], //分类列表
@@ -198,7 +200,12 @@
watch(() => pageData.query.categoryId, (newval) => {
getGoodsList()
})
watch(() => pageData.query.isPauseSale, (newval) => {
getGoodsList()
})
watch(() => pageData.query.isGrounding, (newval) => {
getGoodsList()
})
const popup = reactive({
price: {
show: false
@@ -362,6 +369,7 @@
}
function getGoodsList() {
pageData.hasAjax = false
$tbProductV2(pageData.query).then(res => {
pageData.hasAjax = true
console.log(res);
@@ -377,9 +385,10 @@
})
}
onShow(() => {
getGoodsList()
// getGoodsList()
})
onLoad(() => {
getGoodsList()
$tbShopCategory({
page: 0,
size: 200
@@ -464,14 +473,36 @@
function statesTableClick(index) {
pageData.stateCurrent = index
console.log(index);
if(index==0){
pageData.query.isPauseSale=''
pageData.query.isGrounding=''
return
}
if(index==1){
pageData.query.isPauseSale=1
pageData.query.isGrounding=''
return
}
if(index==2){
pageData.query.isPauseSale=''
pageData.query.isGrounding=1
return
}
if(index==3){
pageData.query.isPauseSale=''
pageData.query.isGrounding=0
return
}
}
let test = ref(false)
function tabsChange(i) {
console.log(i);
pageData.showGoodsDetail = i ? true : false
}