修改商品编辑页面选择规格展示改为仅页面跳转
This commit is contained in:
parent
19d069d17d
commit
59bedc3f61
|
|
@ -113,32 +113,36 @@
|
|||
</template>
|
||||
</view>
|
||||
<template v-if="FormData.typeEnum=='sku' ">
|
||||
<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">
|
||||
<text v-if="!skuList.list.length">选择规格</text>
|
||||
<text v-else>编辑规格</text>
|
||||
</view>
|
||||
<uni-icons type="right"></uni-icons>
|
||||
<view class="block border-top-0 u-p-t-32 u-p-b-32">
|
||||
<view class="u-flex u-row-between " >
|
||||
<view class="color-333 font-bold">
|
||||
<text v-if="!skuList.list.length">选择规格</text>
|
||||
<text v-else>编辑规格</text>
|
||||
</view>
|
||||
</uni-forms-item>
|
||||
<template v-if="skuList.list.length">
|
||||
<view class="u-flex u-col-center" @tap="toGuige">
|
||||
<view>
|
||||
<text v-if="FormData.specsInfoName">{{FormData.specsInfoName}}</text>
|
||||
<text class="color-999" v-else>请选择</text>
|
||||
</view>
|
||||
<view class="u-flex u-p-t-2">
|
||||
<uni-icons type="right" :size="14" color="#999"></uni-icons>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <template >
|
||||
<view class="u-text-left">
|
||||
<view class="u-flex font-bold u-m-b-12">
|
||||
<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 ">{{item.specSnap}}</view>
|
||||
<view class="u-flex-1 ">¥{{item.salePrice}}</view>
|
||||
<!-- <view class="u-flex-1">{{item.stockNumber||0}}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
</template> -->
|
||||
|
||||
</view>
|
||||
|
||||
|
|
@ -1009,6 +1013,7 @@
|
|||
// isShowMall: 1,
|
||||
// })
|
||||
const FormData = reactive({
|
||||
specsInfoName: '',
|
||||
id: "",
|
||||
typeEnum: "normal",
|
||||
specificationsGroup: '',
|
||||
|
|
@ -1110,6 +1115,11 @@
|
|||
}
|
||||
}
|
||||
res.skuList = (res.skuList.length ? res.skuList : [])
|
||||
let specsInfoName = ''
|
||||
for (let i in res.specsInfo) {
|
||||
specsInfoName = i
|
||||
}
|
||||
res.specsInfoName = specsInfoName
|
||||
$goodsData = res
|
||||
skuList.list = res.skuList
|
||||
Object.assign(FormData, res)
|
||||
|
|
@ -1767,9 +1777,11 @@
|
|||
padding: 0 !important;
|
||||
min-height: initial !important;
|
||||
}
|
||||
::v-deep .uni-easyinput__content-input{
|
||||
|
||||
::v-deep .uni-easyinput__content-input {
|
||||
height: inherit;
|
||||
}
|
||||
|
||||
::v-deep .none-label .uni-forms-item .uni-forms-item__label {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@
|
|||
console.log(e);
|
||||
const item = FormData.specList.find(v => v.id === FormData.specId)
|
||||
FormData.selectSpec = (item.specList || [])
|
||||
|
||||
|
||||
}
|
||||
//获取规格数据
|
||||
function getTbProductSpec() {
|
||||
|
|
@ -549,6 +549,8 @@
|
|||
}
|
||||
//判断验证是否通过
|
||||
console.log('pass');
|
||||
const item = FormData.specList.find(v => v.id === FormData.specId)
|
||||
FormData.specsInfoName = item?item.name:''
|
||||
console.log(FormData);
|
||||
emitspecificationsSave()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue