订单,商品,代客下单,分组,分类页面调整
删除批量修改库存数量
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) {
|
||||
|
||||
@@ -398,31 +398,31 @@
|
||||
salePrice: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '必填'
|
||||
errorMessage: '售价必填'
|
||||
}]
|
||||
},
|
||||
memberPrice: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '必填'
|
||||
errorMessage: '会员价必填'
|
||||
}]
|
||||
},
|
||||
costPrice: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '必填'
|
||||
errorMessage: '成本价必填'
|
||||
}]
|
||||
},
|
||||
originPrice: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '必填'
|
||||
errorMessage: '原价必填'
|
||||
}]
|
||||
},
|
||||
suit: {
|
||||
rules: [{
|
||||
required: true,
|
||||
errorMessage: '必填'
|
||||
errorMessage: '起售数量必填'
|
||||
},
|
||||
{
|
||||
validateFunction: function(rule, value, data, callback) {
|
||||
|
||||
@@ -81,13 +81,13 @@
|
||||
{
|
||||
text: '起售数量',
|
||||
key: 'suit',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
text: '库存数量',
|
||||
key: 'stockNumber',
|
||||
value: ''
|
||||
value: 1
|
||||
},
|
||||
// {
|
||||
// text: '库存数量',
|
||||
// key: 'stockNumber',
|
||||
// value: ''
|
||||
// },
|
||||
{
|
||||
text: '分销金额',
|
||||
key: 'firstShared',
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</view>
|
||||
<view class="u-m-t-48">
|
||||
<view>商品名称</view>
|
||||
<view class="u-m-t-16">{{data.name}}</view>
|
||||
<view class="u-m-t-16 color-999" style="">{{data.name}}</view>
|
||||
<view class="u-m-t-38">
|
||||
<view class="u-m-b-32">
|
||||
<view class="u-flex ">
|
||||
@@ -129,6 +129,9 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .u-m-t-16 .u-textarea{
|
||||
border-width: 1px!important;
|
||||
}
|
||||
.box {
|
||||
width: 556rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<view class="control" :style="getComputedStyle()">
|
||||
<view class="u-flex control1" v-if="showControl1">
|
||||
<!-- <view class="btn" @click="changeShowControl1">批量管理</view> -->
|
||||
<view class="btn" @tap="go.to('PAGES_PRODUCT_ADD')">商品添加</view>
|
||||
<view class="btn add" @tap="go.to('PAGES_PRODUCT_ADD')">商品添加</view>
|
||||
<!-- <view class="color-999 btn u-flex u-row-center" @click="emitToggleCategory">
|
||||
<text class="u-m-r-10">{{categoryName||'选择分类'}}</text>
|
||||
<view class="arrow-down" :class="{'up':categoryShow}">
|
||||
@@ -96,7 +96,11 @@
|
||||
.scale7 {
|
||||
transform: scale(0.7);
|
||||
}
|
||||
|
||||
.add{
|
||||
background-color: $my-main-color;
|
||||
border-radius: 100rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
.borde-r {
|
||||
position: relative;
|
||||
|
||||
@@ -119,6 +123,7 @@
|
||||
z-index: 100;
|
||||
background: #3E3A3A;
|
||||
border-radius: 100rpx;
|
||||
overflow: hidden;
|
||||
.btn{
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
}],
|
||||
})
|
||||
// 是否售罄
|
||||
const isPauseSale = ref(false)
|
||||
const isPauseSale = ref(0)
|
||||
// 是否上架
|
||||
const isGrounding = ref(1)
|
||||
const data = ref(props.goods)
|
||||
@@ -88,7 +88,7 @@
|
||||
if (newval) {
|
||||
console.log(props.goods);
|
||||
data.value = props.goods
|
||||
isPauseSale.value = props.goods.isPauseSale ? true : false
|
||||
isPauseSale.value = props.goods.isPauseSale
|
||||
isGrounding.value = props.goods.isGrounding
|
||||
}
|
||||
})
|
||||
|
||||
@@ -259,6 +259,6 @@
|
||||
}
|
||||
|
||||
.number {
|
||||
color: #EE4646;
|
||||
color: #F0465B;
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="safe-page">
|
||||
<up-sticky>
|
||||
<view class="bg-fff u-p-l-30 u-p-r-30 u-p-b-30">
|
||||
<view class="bg-fff u-p-l-30 u-p-b-30">
|
||||
<!-- <view class="myTabs ">
|
||||
<myTabs :list="tabsList" @change="tabsChange"></myTabs>
|
||||
</view> -->
|
||||
@@ -21,10 +21,12 @@
|
||||
<image src="@/static/iconImg/icon-search.svg" class="input-icon" />
|
||||
</template>
|
||||
</uni-easyinput>
|
||||
<button type="text" @click="searchFunc()">搜索</button>
|
||||
<view class="u-m-l-4">
|
||||
<button class="" type="text" @click="searchFunc()"> <text class="color-333">搜索</text></button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="u-flex states1 u-row-between u-font-28">
|
||||
<view class="u-flex states1 u-row-between u-p-r-28 u-font-28">
|
||||
<view class="u-flex">
|
||||
<view class="u-p-l-16 item u-p-r-16 u-p-t-6 u-p-b-6 tranistion u-text-center color-333"
|
||||
:class="{'active':pageData.stateCurrent==index}" @tap="statesTableClick(index)"
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
<view>#{{index+1}} {{data.name}}</view>
|
||||
<view class="color-666 u-font-24 id">ID:{{data.id}}</view>
|
||||
</view>
|
||||
<view class="u-m-t-16 color-666 u-font-24 u-p-b-20 border-bottom">
|
||||
<view class="u-m-t-16 color-666 u-font-24 u-p-b-24 border-bottom">
|
||||
添加时间:
|
||||
<uni-dateformat :date="data.createdAt"></uni-dateformat>
|
||||
</view>
|
||||
<view class="u-m-t-20">
|
||||
<view class="u-m-t-24">
|
||||
<view v-for="(spec,specIndex) in data.specList" :key="specIndex">
|
||||
<view class="font-bold"> {{spec.name}}</view>
|
||||
<view class="u-m-t-16 bg-gray u-flex u-flex-wrap options u-p-20">
|
||||
<view class="font-bold " :class="{'u-m-t-32':specIndex>0}"> {{spec.name}}</view>
|
||||
<view class="u-m-t-24 bg-gray u-flex u-flex-wrap options u-p-24">
|
||||
<view class="u-flex option" v-for="(option,optionIndex) in spec.value" :key="optionIndex" @tap="statusClick(optionIndex)">
|
||||
{{option}}
|
||||
<!-- <view class="sellout" v-if="option.sellOut">已售罄</view>
|
||||
@@ -70,13 +70,13 @@ import { reactive, ref } from 'vue';
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.btns{
|
||||
gap: 0 20rpx;
|
||||
}
|
||||
.item{
|
||||
background: #FFFFFF;
|
||||
padding: 30rpx;
|
||||
padding: 32rpx 24rpx;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
margin-bottom: 30rpx;
|
||||
.id{
|
||||
@@ -87,9 +87,10 @@ import { reactive, ref } from 'vue';
|
||||
.options{
|
||||
gap: 10rpx 50rpx;
|
||||
.option{
|
||||
padding: 24rpx 40rpx;
|
||||
padding: 12rpx 40rpx;
|
||||
background: #F0F2F5;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
position: relative;
|
||||
color: #666;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user