Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
develop-platform
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e7c6d4aa
authored
Nov 15, 2020
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改
1 parent
cdd7d962
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
84 deletions
src/components/d2-form/index.vue
src/components/d2-form/relateProDialog.vue
src/views/goods/editCommodity.vue
src/views/goods/storeDetail.vue
src/components/d2-form/index.vue
View file @
e7c6d4a
...
@@ -110,6 +110,10 @@
...
@@ -110,6 +110,10 @@
<p>
<p>
<span>
{{
subItem
.
goodsName
}}
</span>
<span>
{{
subItem
.
goodsName
}}
</span>
<span>
已配置建议升级价
¥
{{
subItem
.
upgradePrice
}}
元
</span>
<span>
已配置建议升级价
¥
{{
subItem
.
upgradePrice
}}
元
</span>
<el-button
type=
"text"
@
click=
"handleProChange(subItem, subIndex)"
>
点击修改
</el-button>
<span
<span
class=
"icon-delete"
class=
"icon-delete"
@
click=
"handleDelete(item, subItem)"
@
click=
"handleDelete(item, subItem)"
...
@@ -235,7 +239,11 @@
...
@@ -235,7 +239,11 @@
class=
"descList-img img-w-h"
class=
"descList-img img-w-h"
v-else-if=
"subItem.resType === 1"
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
<input
type=
"file"
type=
"file"
class=
"activity-Input img-w-h"
class=
"activity-Input img-w-h"
...
@@ -275,6 +283,7 @@
...
@@ -275,6 +283,7 @@
v-if=
"relateProVisible"
v-if=
"relateProVisible"
:relateProVisible=
"relateProVisible"
:relateProVisible=
"relateProVisible"
:proList=
"proList"
:proList=
"proList"
:originProInfo=
"originProInfo"
@
handleRelateProConfirm=
"handleRelateProConfirm"
@
handleRelateProConfirm=
"handleRelateProConfirm"
@
handleRelateProClose=
"handleRelateProClose"
@
handleRelateProClose=
"handleRelateProClose"
></relate-pro-dialog>
></relate-pro-dialog>
...
@@ -303,6 +312,7 @@ export default {
...
@@ -303,6 +312,7 @@ export default {
relateProVisible
:
false
,
relateProVisible
:
false
,
relateStoreVisible
:
false
,
relateStoreVisible
:
false
,
storeSelected
:
[],
storeSelected
:
[],
proIndex
:
-
1
,
proList
:
[],
proList
:
[],
formData
:
{},
formData
:
{},
separateOpt
:
[{
separateOpt
:
[{
...
@@ -382,12 +392,34 @@ export default {
...
@@ -382,12 +392,34 @@ export default {
})
})
this
.
relateProVisible
=
true
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
)
{
handleRelateProConfirm
(
proInfo
)
{
this
.
relateProVisible
=
false
this
.
relateProVisible
=
false
proInfo
.
profitType
=
1
proInfo
.
profitType
=
1
this
.
originProInfo
=
{}
if
(
this
.
proIndex
!==
-
1
)
{
this
.
formData
.
upgradeGoods
[
this
.
proIndex
]
=
proInfo
}
else
{
this
.
formData
.
upgradeGoods
.
push
(
proInfo
)
this
.
formData
.
upgradeGoods
.
push
(
proInfo
)
}
this
.
proIndex
=
-
1
},
},
handleRelateProClose
()
{
handleRelateProClose
()
{
this
.
originProInfo
=
{}
this
.
proIndex
=
-
1
this
.
relateProVisible
=
false
this
.
relateProVisible
=
false
},
},
handleRelateStoreConfirm
(
selectedData
)
{
handleRelateStoreConfirm
(
selectedData
)
{
...
...
src/components/d2-form/relateProDialog.vue
View file @
e7c6d4a
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
prop=
"goodsCode"
prop=
"goodsCode"
>
>
<el-select
<el-select
v-model=
"
goodVal
"
v-model=
"
proInfo.goodsCode
"
placeholder=
"请选择关联商品"
placeholder=
"请选择关联商品"
value-key=
"goodsCode"
value-key=
"goodsCode"
@
change=
"handleChangeGood"
@
change=
"handleChangeGood"
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
v-for=
"item in proList"
v-for=
"item in proList"
:key=
"item.goodsCode"
:key=
"item.goodsCode"
:label=
"item.goodsName"
:label=
"item.goodsName"
:value=
"item"
:value=
"item
.goodsCode
"
:disabled=
"item.disabled"
:disabled=
"item.disabled"
></el-option>
></el-option>
</el-select>
</el-select>
...
@@ -109,16 +109,26 @@ export default {
...
@@ -109,16 +109,26 @@ export default {
proList
:
{
proList
:
{
type
:
Array
,
type
:
Array
,
default
:
()
=>
[]
default
:
()
=>
[]
},
originProInfo
:
{
type
:
Object
,
default
:
()
=>
{
}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
proInfo
=
this
.
originProInfo
||
this
.
proInfo
console
.
log
(
this
.
proInfo
)
console
.
log
(
this
.
proList
)
},
},
methods
:
{
methods
:
{
handleChangeGood
(
value
)
{
handleChangeGood
(
value
)
{
this
.
proInfo
.
goodsName
=
value
.
goodsName
var
targetItem
=
this
.
proList
.
find
(
item
=>
item
.
goodsCode
===
value
)
this
.
proInfo
.
goodsCode
=
value
.
goodsCode
this
.
proInfo
.
goodsName
=
targetItem
.
goodsName
this
.
proInfo
.
goodsCode
=
targetItem
.
goodsCode
this
.
proInfo
.
thumbUrl
=
targetItem
.
thumbUrl
// console.log(value)
},
},
handleRelateProConfirm
()
{
handleRelateProConfirm
()
{
// console.log(this.proInfo)
// console.log(this.proInfo)
...
...
src/views/goods/editCommodity.vue
View file @
e7c6d4a
...
@@ -172,7 +172,7 @@ export default {
...
@@ -172,7 +172,7 @@ export default {
upgradeGoods
:
data
.
upgradeGoods
.
length
?
data
.
upgradeGoods
.
map
(
item
=>
{
upgradeGoods
:
data
.
upgradeGoods
.
length
?
data
.
upgradeGoods
.
map
(
item
=>
{
const
tempVal
=
{}
const
tempVal
=
{}
upgradeGoodsAttr
.
forEach
(
i
=>
{
upgradeGoodsAttr
.
forEach
(
i
=>
{
tempVal
[
i
]
=
item
[
i
]
item
[
i
]
&&
(
tempVal
[
i
]
=
item
[
i
])
})
})
return
{
return
{
...
tempVal
...
tempVal
...
...
src/views/goods/storeDetail.vue
View file @
e7c6d4a
...
@@ -11,15 +11,15 @@
...
@@ -11,15 +11,15 @@
>
>
<img
<img
class=
"img"
class=
"img"
:src=
"item.
img
"
:src=
"item.
shopPhoto
"
/>
/>
<block>
<block>
<p><span
class=
"txt-order"
>
{{
index
+
1
}}
</span>
{{
item
.
merchantName
}}
</p>
<p><span
class=
"txt-order"
>
{{
index
+
1
}}
</span>
{{
item
.
merchantName
}}
</p>
<p>
<p>
<span
class=
"txt-num"
>
编号
{{
item
.
num
}}
</span>
<span
class=
"txt-num"
>
编号
{{
item
.
merchantId
}}
</span>
<span>
{{
item
.
phone
}}
</span>
<span>
{{
item
.
phone
}}
</span>
</p>
</p>
<p>
{{
item
.
address
}}
</p>
<p>
{{
item
.
provinceName
||
''
}}{{
item
.
cityName
||
''
}}{{
item
.
address
}}
</p>
</block>
</block>
</div>
</div>
</el-scrollbar>
</el-scrollbar>
...
@@ -33,81 +33,7 @@ export default {
...
@@ -33,81 +33,7 @@ export default {
name
:
'storeDetail'
,
name
:
'storeDetail'
,
data
()
{
data
()
{
return
{
return
{
detailArr
:
[
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: '广东省深圳市南山区广东省深圳'
// }
]
}
}
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment