Commit e7c6d4aa by cwq0219

修改

1 parent cdd7d962
......@@ -110,6 +110,10 @@
<p>
<span>{{subItem.goodsName}}&nbsp;</span>
<span>已配置建议升级价&nbsp;¥{{subItem.upgradePrice}}元</span>
<el-button
type="text"
@click="handleProChange(subItem, subIndex)"
>点击修改</el-button>
<span
class="icon-delete"
@click="handleDelete(item, subItem)"
......@@ -235,7 +239,11 @@
class="descList-img img-w-h"
v-else-if="subItem.resType === 1"
>
<img v-show="subItem.content" class="img-w-h" :src="subItem.content" />
<img
v-show="subItem.content"
class="img-w-h"
:src="subItem.content"
/>
<input
type="file"
class="activity-Input img-w-h"
......@@ -275,6 +283,7 @@
v-if="relateProVisible"
:relateProVisible="relateProVisible"
:proList="proList"
:originProInfo="originProInfo"
@handleRelateProConfirm="handleRelateProConfirm"
@handleRelateProClose="handleRelateProClose"
></relate-pro-dialog>
......@@ -303,6 +312,7 @@ export default {
relateProVisible: false,
relateStoreVisible: false,
storeSelected: [],
proIndex: -1,
proList: [],
formData: {},
separateOpt: [{
......@@ -382,12 +392,34 @@ export default {
})
this.relateProVisible = true
},
handleProChange(targetItem, targetIndex) {
// console.log(targetItem)
var proSelectedIds = this.formData.upgradeGoods.map(item => item.goodsCode)
this.proList.forEach(item => {
if (proSelectedIds.includes(item.goodsCode) && (item.goodsCode !== targetItem.goodsCode)) {
item.disabled = true
} else {
item.disabled = false
}
})
this.proIndex = targetIndex
this.originProInfo = targetItem
this.relateProVisible = true
},
handleRelateProConfirm(proInfo) {
this.relateProVisible = false
proInfo.profitType = 1
this.formData.upgradeGoods.push(proInfo)
this.originProInfo = {}
if (this.proIndex !== -1) {
this.formData.upgradeGoods[this.proIndex] = proInfo
} else {
this.formData.upgradeGoods.push(proInfo)
}
this.proIndex = -1
},
handleRelateProClose() {
this.originProInfo = {}
this.proIndex = -1
this.relateProVisible = false
},
handleRelateStoreConfirm(selectedData) {
......
......@@ -20,7 +20,7 @@
prop="goodsCode"
>
<el-select
v-model="goodVal"
v-model="proInfo.goodsCode"
placeholder="请选择关联商品"
value-key="goodsCode"
@change="handleChangeGood"
......@@ -29,7 +29,7 @@
v-for="item in proList"
:key="item.goodsCode"
:label="item.goodsName"
:value="item"
:value="item.goodsCode"
:disabled="item.disabled"
></el-option>
</el-select>
......@@ -109,16 +109,26 @@ export default {
proList: {
type: Array,
default: () => []
},
originProInfo: {
type: Object,
default: () => { }
}
},
mounted() {
this.proInfo = this.originProInfo || this.proInfo
console.log(this.proInfo)
console.log(this.proList)
},
methods: {
handleChangeGood(value) {
this.proInfo.goodsName = value.goodsName
this.proInfo.goodsCode = value.goodsCode
var targetItem = this.proList.find(item => item.goodsCode === value)
this.proInfo.goodsName = targetItem.goodsName
this.proInfo.goodsCode = targetItem.goodsCode
this.proInfo.thumbUrl = targetItem.thumbUrl
// console.log(value)
},
handleRelateProConfirm() {
// console.log(this.proInfo)
......
......@@ -172,7 +172,7 @@ export default {
upgradeGoods: data.upgradeGoods.length ? data.upgradeGoods.map(item => {
const tempVal = {}
upgradeGoodsAttr.forEach(i => {
tempVal[i] = item[i]
item[i] && (tempVal[i] = item[i])
})
return {
...tempVal
......
......@@ -11,15 +11,15 @@
>
<img
class="img"
:src="item.img"
:src="item.shopPhoto"
/>
<block>
<p><span class="txt-order">{{index + 1}}</span>{{item.merchantName}}</p>
<p>
<span class="txt-num">编号{{item.num}}</span>
<span class="txt-num">编号{{item.merchantId}}</span>
<span>{{item.phone}}</span>
</p>
<p>{{item.address}}</p>
<p>{{item.provinceName || ''}}{{item.cityName || ''}}{{item.address}}</p>
</block>
</div>
</el-scrollbar>
......@@ -33,81 +33,7 @@ export default {
name: 'storeDetail',
data() {
return {
detailArr: [
// {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }, {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }, {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }, {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }, {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }, {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }, {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }, {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }, {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }, {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }, {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }, {
// name: '滴滴虎智慧门店',
// img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg',
// num: 'GLS001',
// phone: '0775-12345678',
// addr: '广东省深圳市南山区广东省深圳'
// }
]
detailArr: []
}
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!