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