商品管理更新

This commit is contained in:
YeMingfei666 2024-09-29 16:13:27 +08:00
parent 74c6237037
commit 8229afcc8e
6 changed files with 28 additions and 18 deletions

View File

@ -1,9 +1,10 @@
<template> <template>
<view class="u-p-30 safe-page"> <view class="u-p-30 safe-page min-page">
<up-sticky v-if="option.type==='edit'" offset-top="20" zIndex="99"> <up-sticky v-if="option.type==='edit'" offset-top="20" zIndex="99">
<myTabs :list="tabsList" v-model="tabsCurrent"></myTabs> <myTabs :list="tabsList" v-model="tabsCurrent"></myTabs>
</up-sticky> </up-sticky>
<view class="box"> <view class="box">
<template v-if="tabsCurrent===0"> <template v-if="tabsCurrent===0">
<view class="basic"> <view class="basic">
<uni-forms :model="FormData" :rules="rules" :border="true" label-position="top" <uni-forms :model="FormData" :rules="rules" :border="true" label-position="top"

View File

@ -109,9 +109,9 @@
} }
function blur() { function blur() {
console.log('blur'); console.log('blur');
setTimeout(()=>{ // setTimeout(()=>{
popShow.value = false // popShow.value = false
},100) // },100)
} }
onMounted(() => { onMounted(() => {
setText() setText()

View File

@ -99,9 +99,9 @@
} }
function blur() { function blur() {
setTimeout(()=>{ // setTimeout(()=>{
popShow.value = false // popShow.value = false
},100) // },100)
} }
onMounted(() => { onMounted(() => {
setText() setText()

View File

@ -47,7 +47,7 @@
<view class="u-m-t-24"> <view class="u-m-t-24">
<template v-if="data.skuList.length>=2"> <template v-if="data.skuList.length>=2">
<view class="u-flex u-flex-wrap w-full gap-10 u-col-top"> <view class="u-flex u-flex-wrap w-full gap-10 u-col-top">
<view class="u-font-24 info-p-l u-m-t-14">规格</view> <view class="u-font-24 info-p-l u-m-t-6">规格</view>
<view class="skd" v-for="(item,index) in data.skuList" :key="index" <view class="skd" v-for="(item,index) in data.skuList" :key="index"
@click="guigeClick(index)"> @click="guigeClick(index)">
<text>{{item.specSnap||item.name}}</text> <text>{{item.specSnap||item.name}}</text>
@ -325,7 +325,7 @@
} }
.skd { .skd {
padding: 20rpx 20rpx 14rpx 20rpx; padding: 10rpx 38rpx 8rpx 40rpx;
background: #F0F2F5; background: #F0F2F5;
border-radius: 4rpx; border-radius: 4rpx;
position: relative; position: relative;
@ -339,9 +339,10 @@
right: 0; right: 0;
top: 0; top: 0;
font-size: 12rpx; font-size: 12rpx;
height: 18rpx;
line-height: 18rpx;
right: 0; right: 0;
padding: 2rpx 4rpx; border-radius: 0rpx 2rpx 2rpx 8rpx;
border-radius: 0rpx 4rpx 4rpx 4rpx;
} }
.tag-primary { .tag-primary {

View File

@ -50,8 +50,11 @@
<template v-if="pageData.hasAjax&&!pageData.goodsList.length"> <template v-if="pageData.hasAjax&&!pageData.goodsList.length">
<my-img-empty tips="未找到相关商品"></my-img-empty> <my-img-empty tips="未找到相关商品"></my-img-empty>
</template> </template>
<my-pagination :totalElements="pageData.totalElements" :size="pageData.query.size" <template v-if="pageData.goodsList.length">
@change="pageChange"></my-pagination> <my-pagination :totalElements="pageData.totalElements" :size="pageData.query.size"
@change="pageChange"></my-pagination>
</template>
<view style="height: 100rpx;"></view> <view style="height: 100rpx;"></view>
</view> </view>
@ -476,11 +479,15 @@
} }
}); });
} }
function resetQuery(){
pageData.totalElements=0;
pageData.query.page=0;
}
function statesTableClick(index) { function statesTableClick(index) {
pageData.stateCurrent = index;
pageData.stateCurrent = index resetQuery()
console.log(index); console.log(index);
if(index==0){ if(index==0){
pageData.query.isPauseSale='' pageData.query.isPauseSale=''
@ -540,6 +547,7 @@
function searchFunc() { function searchFunc() {
console.log('searchFunc'); console.log('searchFunc');
resetQuery()
getGoodsList() getGoodsList()
} }

View File

@ -9,7 +9,7 @@
</view> </view>
<my-model :showBtn="modelData.showBtn" ref="model" @confirm="modelConfirm" :title="modelData.title" :desc="modelData.desc"> <my-model :showBtn="modelData.showBtn" ref="model" @confirm="modelConfirm" :title="modelData.title" :desc="modelData.desc">
<template #desc> <template #desc>
<view class="u-p-30 u-m-t-40 u-p-b-60" v-if="specificationsData"> <view class="u-p-30 u-m-t-40 u-p-b-60" v-if="specificationsData">
<view class="u-flex u-row-between"> <view class="u-flex u-row-between">
<view>当前状态</view> <view>当前状态</view>
@ -135,7 +135,7 @@
specificationsData.sellOut=false specificationsData.sellOut=false
specificationsData.index=arr[0] specificationsData.index=arr[0]
specificationsData.optionIndex=arr[1] specificationsData.optionIndex=arr[1]
modelOpen() // modelOpen()
} }
function pageChange(page) { function pageChange(page) {
pageData.query.page=page-1 pageData.query.page=page-1