订单,商品,代客下单,分组,分类页面调整
删除批量修改库存数量
This commit is contained in:
@@ -10,27 +10,30 @@
|
||||
<uni-forms :model="FormData" :rules="rules" :border="true" label-position="top"
|
||||
err-show-type="toast" validateTrigger="submit" label-width="350" ref="Forms">
|
||||
<view class="block">
|
||||
<uni-forms-item label="商品类型" required showRequired>
|
||||
<up-radio-group v-model="FormData.typeEnum" placement="row">
|
||||
<up-radio :customStyle="{marginRight: '30px'}"
|
||||
v-for="(item, index) in pageData.types" :key="index" :label="item.name"
|
||||
:name="item.value">
|
||||
</up-radio>
|
||||
</up-radio-group>
|
||||
<!-- <view class="u-flex u-flex-wrap types " :class="{disabled:option.productId!==''}">
|
||||
<view class="item" @tap="changeFormData('typeEnum',item.value)"
|
||||
:class="{active:FormData.typeEnum===item.value}"
|
||||
v-for="(item,index) in pageData.types" :key="index">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="u-font-24 color-999 u-m-t-10">
|
||||
{{item.desc}}
|
||||
<view class="border-top-0">
|
||||
<uni-forms-item label="商品类型" required showRequired>
|
||||
<up-radio-group v-model="FormData.typeEnum" placement="row">
|
||||
<up-radio :customStyle="{marginRight: '30px'}"
|
||||
v-for="(item, index) in pageData.types" :key="index" :label="item.name"
|
||||
:name="item.value">
|
||||
</up-radio>
|
||||
</up-radio-group>
|
||||
<!-- <view class="u-flex u-flex-wrap types " :class="{disabled:option.productId!==''}">
|
||||
<view class="item" @tap="changeFormData('typeEnum',item.value)"
|
||||
:class="{active:FormData.typeEnum===item.value}"
|
||||
v-for="(item,index) in pageData.types" :key="index">
|
||||
<view class="title">{{item.title}}</view>
|
||||
<view class="u-font-24 color-999 u-m-t-10">
|
||||
{{item.desc}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</uni-forms-item>
|
||||
</view> -->
|
||||
|
||||
</uni-forms-item>
|
||||
</view>
|
||||
|
||||
<uni-forms-item ref="fileItem" label="图片" required showRequired>
|
||||
<my-upload-file ref="refFile" :images="FormData.images"></my-upload-file>
|
||||
<my-upload-file ref="refFile" :images="FormData.images" :imageStyles="imageStyles"></my-upload-file>
|
||||
<view class="u-m-t-16 color-999 u-font-24">
|
||||
注:第一张图为商品封面图,图片尺寸为750x750
|
||||
</view>
|
||||
@@ -39,7 +42,7 @@
|
||||
<uni-easyinput :paddingNone="inputPaddingNone" :placeholderStyle="placeholderStyle"
|
||||
:inputBorder="inputBorder" v-model="FormData.name" placeholder="请输入商品名称" />
|
||||
</uni-forms-item>
|
||||
<view class="border-top-0">
|
||||
<view class="">
|
||||
<uni-forms-item label="商品描述">
|
||||
<uni-easyinput :paddingNone="inputPaddingNone" :placeholderStyle="placeholderStyle"
|
||||
type="textarea" v-model="FormData.shortTitle" placeholder="请填写商品简述" />
|
||||
@@ -109,7 +112,7 @@
|
||||
</template>
|
||||
</view>
|
||||
<template v-if="FormData.typeEnum=='sku' ">
|
||||
<view class="block border-top-0">
|
||||
<view class="block border-top-0 u-p-t-0">
|
||||
<uni-forms-item label=" ">
|
||||
<view class="u-flex u-row-between " @tap="toGuige">
|
||||
<view class="color-333 font-bold">
|
||||
@@ -120,17 +123,17 @@
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<template v-if="skuList.list.length">
|
||||
<view class="u-text-center">
|
||||
<view class="u-text-left">
|
||||
<view class="u-flex font-bold u-m-b-12">
|
||||
<view class="u-flex-1 u-text-left">组合名称</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 class="u-flex-1">库存数量</view> -->
|
||||
</view>
|
||||
<view class="u-flex u-p-b-12 u-p-t-12" v-for="(item,index) in skuList.list"
|
||||
:key="index">
|
||||
<view class="u-flex-1 u-text-left">{{item.specSnap}}</view>
|
||||
<view class="u-flex-1">¥{{item.salePrice}}</view>
|
||||
<view class="u-flex-1">{{item.stockNumber||0}}</view>
|
||||
<view class="u-flex-1 ">{{item.specSnap}}</view>
|
||||
<view class="u-flex-1 ">¥{{item.salePrice}}</view>
|
||||
<!-- <view class="u-flex-1">{{item.stockNumber||0}}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -390,7 +393,7 @@
|
||||
</template>
|
||||
|
||||
<template v-if="FormData.typeEnum!='group'">
|
||||
<view class="block">
|
||||
<view class="block ">
|
||||
<!-- <view class="border-top-0">
|
||||
<uni-forms-item label="上架区域">
|
||||
<view class="u-flex">
|
||||
@@ -572,7 +575,13 @@
|
||||
watch,
|
||||
nextTick
|
||||
} from 'vue';
|
||||
|
||||
const imageStyles=reactive({
|
||||
width:82,
|
||||
height:82,
|
||||
border:{
|
||||
radius:'4px'
|
||||
}
|
||||
})
|
||||
async function upDateGoods(par) {
|
||||
const res = await $updateProductData([{
|
||||
id: FormData.id,
|
||||
@@ -1638,7 +1647,10 @@
|
||||
// /* #endif */
|
||||
// z-index: 999;
|
||||
}
|
||||
|
||||
::v-deep .uni-forms-item--border{
|
||||
padding-top: 12px;
|
||||
padding-bottom: 12px;
|
||||
}
|
||||
.stick-bottom {
|
||||
top: 0;
|
||||
z-index: 10;
|
||||
@@ -1694,12 +1706,11 @@
|
||||
}
|
||||
|
||||
.box {
|
||||
margin-top: 36rpx;
|
||||
margin-top: 32rpx;
|
||||
font-size: 28rpx;
|
||||
|
||||
.block {
|
||||
background: #FFFFFF;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
border-radius: 8rpx 18rpx 8rpx 18rpx;
|
||||
padding: 12rpx 24rpx;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
<view class="default-box-padding bg-fff border-r-18">
|
||||
<view class="u-flex u-row-between">
|
||||
<view>商品名称</view>
|
||||
<template v-if="isSku">
|
||||
<view class="u-flex u-font-24 color-666">
|
||||
<view class="u-m-r-20">绑定至规格</view>
|
||||
<up-switch :size="18" v-model="isBindGuige" :disabled="!isSku">绑定至规格</up-switch>
|
||||
</view>
|
||||
</template>
|
||||
<!-- <template v-if="isSku"> -->
|
||||
<view class="u-flex u-font-24 color-666">
|
||||
<view class="u-m-r-20">绑定至规格</view>
|
||||
<up-switch :size="18" v-model="isBindGuige" :disabled="!isSku">绑定至规格</up-switch>
|
||||
</view>
|
||||
<!-- </template> -->
|
||||
</view>
|
||||
<view class="border-bottom u-m-t-16 u-p-b-32">{{goods.name}}</view>
|
||||
<view class="">
|
||||
@@ -41,7 +41,7 @@
|
||||
</view>
|
||||
<view class="u-flex input">
|
||||
<up-input border="none" v-model="item.surplusStock"></up-input>
|
||||
<up-icon @click="delGuigeHaocao(index,haocaiIndex)" color="#EB4F4F"
|
||||
<up-icon @click="delGuigeHaocao(index,haocaiIndex)" color="#EA4025"
|
||||
:size="16" name="minus-circle-fill"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
@@ -101,7 +101,7 @@
|
||||
<view class="u-flex-1 ">
|
||||
<view class="u-flex input">
|
||||
<up-input border="none" v-model="item.surplusStock"></up-input>
|
||||
<up-icon @click="delHaocai(index)" color="#EB4F4F" :size="16"
|
||||
<up-icon @click="delHaocai(index)" color="#EA4025" :size="16"
|
||||
name="minus-circle-fill"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
@@ -140,7 +140,7 @@
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<my-button type="primary" shape="circle" @click="save">保存</my-button>
|
||||
<my-button type="primary" shape="circle" font-weight="700" font-size="32" @click="save">保存</my-button>
|
||||
<my-button bgColor="#F9F9F9" shape="circle" color="#999" @click="cancel">取消</my-button>
|
||||
</view>
|
||||
|
||||
@@ -302,9 +302,9 @@
|
||||
watch(() => props.goods.typeEnum, (newval) => {
|
||||
isBindGuige.value = isSku.value
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async function save() {
|
||||
const bol = await hasPermission('允许修改商品')
|
||||
if (!bol) {
|
||||
|
||||
Reference in New Issue
Block a user