订单,商品,代客下单,分组,分类页面调整

删除批量修改库存数量
This commit is contained in:
2024-10-16 18:10:29 +08:00
parent 2b85d19453
commit 2800569b47
24 changed files with 283 additions and 156 deletions

View File

@@ -8,7 +8,8 @@
:checked="data.checked" /><text></text>
</label>
</view>
<image mode="aspectFill" :src="data.pic" class="img"></image>
<up-image width="126rpx" height="126rpx" :src="data.pic" :radius="6"></up-image>
<!-- <image mode="aspectFill" :src="data.pic" class="img"></image> -->
<view class=" u-p-l-16 u-flex u-p-r-16 u-flex-1 u-col-top">
<view class="u-flex-1">
<view class="color-333 font-bold">{{data.name}}</view>
@@ -24,7 +25,7 @@
</view>
<view class="u-m-t-24 u-flex u-row-between">
<view >
<view>
<!-- <template v-if="data.childrenList.length">
<view class="u-flex color-999 u-flex u-col-center" @tap="useTypeClick">
<text class="u-font-24">{{computedUserType}} </text>
@@ -33,16 +34,19 @@
</view>
</view>
</template> -->
<view class="u-flex">
<view class="u-m-r-18 color-999">开关</view>
<my-switch v-model="isShow" @change="isShowChange"></my-switch>
</view>
<view class="u-flex">
<view class="u-m-r-18 color-999">是否启用</view>
<my-switch v-model="isShow" @change="isShowChange"></my-switch>
</view>
</view>
<view class="u-flex no-wrap">
<view class="u-m-t-24 u-flex u-row-right">
<view class="btn-default btn" @click="del">删除</view>
<view class="btn-primary btn u-m-l-38" @click="toEdit">编辑</view>
</view>
<!-- <view class="u-flex no-wrap">
<view class="btn-default btn" @click="del">删除</view>
<view class="btn-primary btn u-m-l-38" @click="toEdit">编辑</view>
</view> -->
</view>
</view>
@@ -61,7 +65,7 @@
ColorMain
} from '@/commons/color.js'
const emits = defineEmits(['radioClick', 'changeClick', 'useTypeClick', 'del','isShowChange'])
const emits = defineEmits(['radioClick', 'changeClick', 'useTypeClick', 'del', 'isShowChange'])
const props = defineProps({
index: {
@@ -71,7 +75,7 @@
type: Object,
default: () => {
return {
isShow:true
isShow: true
}
}
},
@@ -80,13 +84,17 @@
default: false
}
})
let isShow=ref(props.data.isShow)
watch(()=>props.data.isShow,(newval)=>{
isShow.value=newval
let isShow = ref(props.data.isShow)
watch(() => props.data.isShow, (newval) => {
isShow.value = newval
})
function isShowChange(){
function isShowChange() {
console.log(isShow.value);
emits('isShowChange',{...props.data,isShow:isShow.value})
emits('isShowChange', {
...props.data,
isShow: isShow.value
})
}
const computedUserType = computed(() => {
const len = props.data.useTypes.length
@@ -132,7 +140,7 @@
//携带参数type edit跳转到商品添加页面编辑与添加同一页面根据type值来判断
function toEdit() {
uni.setStorageSync('cateItem',props.data)
uni.setStorageSync('cateItem', props.data)
go.to('PAGES_CATEGORY_EDIT', {
type: 'edit',
})
@@ -144,19 +152,19 @@
$price-color: #F02C45;
.btn {
padding: 10rpx 40rpx;
padding: 6rpx 28rpx;
border-radius: 100rpx;
border: 2rpx solid transparent;
font-size: 24rpx;
border: 1px solid transparent;
}
.btn-primary {
border-color: $my-main-color;
;
color: $my-main-color;
}
.btn-default {
border-color: #F4F4F4;
border-color: #999;
color: #999;
}