Commit 6cb9e22e by 张立顺

商品字段别名回显

1 parent 3ad40be4
<template> <template>
<!-- <div>商品详情</div> --> <!-- <div>商品详情</div> -->
<GLDialog destroy-on-close="true" :visible.sync="dialogShow" :hasFooter="false" mode="big" bigTitle="产品详情" :close-on-click-modal="false" @onOk="handleSubmit" @onCancel="handleDetailClose"> <GLDialog destroy-on-close="true" :visible.sync="dialogShow" :hasFooter="false" mode="big" bigTitle="产品详情"
:close-on-click-modal="false" @onOk="handleSubmit" @onCancel="handleDetailClose">
<div class="detail-content"> <div class="detail-content">
<!-- 商品详情 --> <!-- 商品详情 -->
<div class="goodsInfoCom"> <div class="goodsInfoCom">
...@@ -22,16 +23,11 @@ ...@@ -22,16 +23,11 @@
<div class="skuCon"> <div class="skuCon">
<div class="label">规格:</div> <div class="label">规格:</div>
<div class="itemCon"> <div class="itemCon">
<div <div class="skuItem one-line-ellipsis pointer" :class="{ active: index === selectIndex }"
class="skuItem one-line-ellipsis pointer" v-for="(item, index) in goodsInfo.upgradeGoodsList" :key="index" @click="
:class="{ active: index === selectIndex }"
v-for="(item, index) in goodsInfo.upgradeGoodsList"
:key="index"
@click="
selectIndex = index selectIndex = index
setHandleItemInfo(item) setHandleItemInfo(item)
" ">
>
{{ item.upgradeGoodsName }} {{ item.upgradeGoodsName }}
</div> </div>
</div> </div>
...@@ -50,20 +46,20 @@ ...@@ -50,20 +46,20 @@
</div> </div>
<!-- <i class="carIcon"></i> --> <!-- <i class="carIcon"></i> -->
</div> </div>
<!-- <div class="table-wrap"> <div class="table-wrap" v-if="tableInfo.length">
<h3>适用门店</h3> <h3>适用门店</h3>
<GLTable :hasNum="false" :hasPage="false" :tableParams="tableParams" :table-data="tableInfo"></GLTable> <GLTable :hasNum="false" :hasPage="false" :tableParams="tableParams" :table-data="tableInfo"></GLTable>
</div> --> </div>
<div class="table-wrap"> <div class="table-wrap">
<h3>产品详情</h3> <h3>产品详情</h3>
<div class="goodsDescList"> <div class="goodsDescList">
<div class="goodsDescItem" v-for="(item, index) in goodsInfo.goodsDescList" :key="index"> <div class="goodsDescItem" v-for="(item, index) in goodsInfo.goodsDescList" :key="index">
<img :src="item.content" v-if="item.resType == 1" class="productDetailsImg" alt="" /> <img :src="item.content" v-if="item.resType == 1" class="productDetailsImg" alt="" />
<!-- <div class="goodsDescItem__title">{{ item.title }}</div> --> <!-- <div class="goodsDescItem__title">{{ item.title }}</div> -->
<div v-if="item.resType == 2" class="goodsDescItem__content" v-html="item.content"></div> <div v-if="item.resType == 2" class="goodsDescItem__content" v-html="item.content"></div>
</div>
</div> </div>
</div> </div>
</div>
</div> </div>
</GLDialog> </GLDialog>
</template> </template>
...@@ -79,7 +75,7 @@ export default { ...@@ -79,7 +75,7 @@ export default {
}, },
selectItemInfo: { selectItemInfo: {
type: Object, type: Object,
default: () => {} default: () => { }
}, },
goodsId: { goodsId: {
type: [String, Number] type: [String, Number]
...@@ -106,7 +102,7 @@ export default { ...@@ -106,7 +102,7 @@ export default {
tableColumns: [ tableColumns: [
{ {
label: '商户名称', label: '商户名称',
prop: 'merchantNames' prop: 'merchantName'
}, },
{ {
label: '商户号', label: '商户号',
...@@ -114,7 +110,7 @@ export default { ...@@ -114,7 +110,7 @@ export default {
}, },
{ {
label: '商品别名', label: '商品别名',
prop: 'upgradeGoodsAlias' prop: 'goodsAlias'
} }
] ]
}, },
...@@ -172,6 +168,7 @@ export default { ...@@ -172,6 +168,7 @@ export default {
upgradeGoodsId: id, upgradeGoodsId: id,
purchasePrice purchasePrice
}) })
this.tableInfo = item.merchantGoodsInfo
}, },
handleDetailClose() { handleDetailClose() {
this.dialogShow = false this.dialogShow = false
...@@ -321,12 +318,14 @@ export default { ...@@ -321,12 +318,14 @@ export default {
background: #5850ff; background: #5850ff;
border-radius: 4px; border-radius: 4px;
} }
.table-wrap { .table-wrap {
margin-top:24px; margin-top: 24px;
h3 { h3 {
font-size: 16px; font-size: 16px;
color: #333333; color: #333333;
margin-bottom:16px; margin-bottom: 16px;
} }
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!