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

删除批量修改库存数量
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

@@ -13,13 +13,13 @@
</view>
<view class="">
<uni-forms-item label="分类名称" required name="name">
<uni-easyinput :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
<uni-easyinput padding-none="true" :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
v-model="category.name" placeholder="输入分类名称" />
</uni-forms-item>
</view>
<template v-if="option.type==='edit'">
<uni-forms-item label="排序" required name="sort">
<uni-easyinput :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
<uni-easyinput padding-none="true" :placeholderStyle="placeholderStyle" :inputBorder="inputBorder"
v-model="category.sort" type="number" placeholder="排序越小越靠前" />
</uni-forms-item>
</template>
@@ -72,18 +72,18 @@
</view>
<template v-if="option.type==='edit'">
<view class="font-bold u-m-t-32 u-m-b-32">子分类</view>
<view class="block u-p-t-30" v-if=" category.childrenList.length">
<view class="u-flex u-text-center font-bold">
<view class="u-flex-1">名称</view>
<view class="block u-p-t-32 u-p-b-32" v-if=" category.childrenList.length">
<view class="u-flex u-text-center u-font-24">
<view class="u-flex-1 ">名称</view>
<view class="u-flex-1">图片</view>
<view class="u-flex-1">状态</view>
<view class="u-flex-1">颜色</view>
<view class="u-flex-1">操作</view>
</view>
<view class="bg-gray u-p-t-20">
<view class="bg-gray u-p-t-20 u-m-t-24">
<view class="u-flex u-p-t-10 u-p-b-10" v-for="(item,index) in category.childrenList"
:key="index">
<view class="u-flex-1 u-flex u-row-center">
<view class="u-flex-1 u-flex u-p-l-24 ">
{{item.name}}
</view>
<view class="u-flex-1 u-flex u-row-center">
@@ -96,7 +96,7 @@
<view class="u-flex-1 u-flex u-row-center">
{{item.style}}
</view>
<view class="u-flex-1 u-flex u-row-center">
<view class="u-flex-1 u-flex u-row-right u-p-r-24 u-flex ">
<my-button @tap="moreShow(item,index)" :width="100" :height="40">
<view class="u-font-24 no-wrap">更多</view>
</my-button>
@@ -747,13 +747,15 @@
.lh40 {
line-height: 40rpx;
}
::v-deep .uni-forms-item.is-direction-top .uni-forms-item__label{
padding-bottom: 24rpx;
}
.box {
font-size: 28rpx;
.block {
background: #FFFFFF;
border-radius: 18rpx 18rpx 18rpx 18rpx;
border-radius: 6px 18rpx 0 18rpx;
padding: 12rpx 24rpx;
margin-bottom: 32rpx;
}

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;
}