Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-pay
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 409c4806
authored
Nov 10, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
商品管理-编辑
1 parent
cedd450d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
22 deletions
src/api/modules/proManage.js
src/views/productGroup/editProduct.vue
src/views/productGroup/index.vue
src/api/modules/proManage.js
View file @
409c480
...
@@ -55,4 +55,14 @@ const deleteTakeProApi = params => {
...
@@ -55,4 +55,14 @@ const deleteTakeProApi = params => {
})
})
}
}
export
default
{
getListApi
,
getProShareApi
,
topProApi
,
updateStatusProApi
,
deleteTakeProApi
}
const
getProInfoApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
getById`
return
http
({
url
:
'rop-scrm-shopmall/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
export
default
{
getListApi
,
getProShareApi
,
topProApi
,
updateStatusProApi
,
deleteTakeProApi
,
getProInfoApi
}
src/views/productGroup/editProduct.vue
View file @
409c480
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
<p
class=
"edit-sub-title"
>
{{
item
.
title
}}
</p>
<p
class=
"edit-sub-title"
>
{{
item
.
title
}}
</p>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRef"
:labelWidth=
"labelWidth"
:isBlock=
"true"
:formRef=
"item.editChildRef"
:formObj=
"editForm"
:formData=
"item.editFormData"
:formRules=
"item.editRule"
>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRef"
:labelWidth=
"labelWidth"
:isBlock=
"true"
:formRef=
"item.editChildRef"
:formObj=
"editForm"
:formData=
"item.editFormData"
:formRules=
"item.editRule"
>
<template
slot=
"describeBtn"
>
<template
slot=
"describeBtn"
>
<el-button
type=
"primary"
@
click=
"handleDescribeImgAdd"
>
添加图片
</el-button>
<el-button
:disabled=
"routeInfo.addOrEdit == 3"
type=
"primary"
@
click=
"handleDescribeImgAdd"
>
添加图片
</el-button>
</
template
>
</
template
>
<div
:style=
"{ 'margin-left': labelWidth }"
slot=
"descImgs"
slot-scope=
"scope"
>
<div
:style=
"{ 'margin-left': labelWidth }"
slot=
"descImgs"
slot-scope=
"scope"
>
<div
v-for=
"(subItem, subIndex) in editForm[scope.scope.name]"
:key=
"subIndex"
class=
"flex"
>
<div
v-for=
"(subItem, subIndex) in editForm[scope.scope.name]"
:key=
"subIndex"
class=
"flex"
>
...
@@ -94,19 +94,6 @@
...
@@ -94,19 +94,6 @@
</div>
</div>
<p
class=
"edit-tips"
>
支持上传20MB以内的jpg,png,jpeg图片
</p>
<p
class=
"edit-tips"
>
支持上传20MB以内的jpg,png,jpeg图片
</p>
</div>
</div>
<!-- 选择商品 -->
<!-- <div v-show="subItem.bannerImg" class="flex-grow">
<div>
<span>商品链接:</span>
<el-button v-show="!subItem.goodsId" type="text" class="btn-link" @click="handleSinglePro(scope.scope, subIndex)">选择</el-button>
<el-button v-show="subItem.goodsId" type="text" class="btn-link" @click="handleSinglePro(scope.scope, subIndex)">更换</el-button>
<el-button v-show="subItem.goodsId" type="text" class="btn-link" @click="handleProDelete(subIndex)">删除</el-button>
</div>
<div class="show-pro-box flex" v-if="subItem.goodsId">
<img class="img-60" :src="subItem.goods.goodsImage">
<p class="pro-txt flex-grow one-line-ellipsis">{{ subItem.goods.goodsName }}</p>
</div>
</div> -->
</div>
</div>
</div>
</div>
<
template
slot=
"retailPrice"
>
<
template
slot=
"retailPrice"
>
...
@@ -119,7 +106,7 @@
...
@@ -119,7 +106,7 @@
<p>
作为货源供给门店的价格
</p>
<p>
作为货源供给门店的价格
</p>
</
template
>
</
template
>
<div
slot=
"selectMerchant"
slot-scope=
"scope"
class=
"select-merchant"
>
<div
slot=
"selectMerchant"
slot-scope=
"scope"
class=
"select-merchant"
>
<el-button
type=
"primary"
@
click=
"handleRelateStoreClose(scope)"
>
{{ editForm.supplyMerchantList.length ? '更换' : '请选择' }}
</el-button>
<el-button
:disabled=
"routeInfo.addOrEdit == 3"
type=
"primary"
@
click=
"handleRelateStoreClose(scope)"
>
{{ editForm.supplyMerchantList.length ? '更换' : '请选择' }}
</el-button>
</div>
</div>
<div
slot=
"merchantTable"
class=
"select-merchant"
>
<div
slot=
"merchantTable"
class=
"select-merchant"
>
<GLTable
v-show=
"editForm.supplyMerchantList.length"
:hasPage=
"false"
:tableParams=
"tableParams"
:tableData=
"editForm.supplyMerchantList"
>
<GLTable
v-show=
"editForm.supplyMerchantList.length"
:hasPage=
"false"
:tableParams=
"tableParams"
:tableData=
"editForm.supplyMerchantList"
>
...
@@ -449,6 +436,7 @@ export default {
...
@@ -449,6 +436,7 @@ export default {
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
routeInfo
=
this
.
$route
.
params
this
.
routeInfo
=
this
.
$route
.
params
// console.log(this.routeInfo)
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
title
=
this
.
titleObj
[
this
.
routeInfo
.
addOrEdit
]
this
.
getBaseDate
().
then
(()
=>
{
this
.
getBaseDate
().
then
(()
=>
{
this
.
getOptionsList
(
0
,
'editFormData'
,
false
)
this
.
getOptionsList
(
0
,
'editFormData'
,
false
)
...
@@ -498,15 +486,51 @@ export default {
...
@@ -498,15 +486,51 @@ export default {
}
}
})
})
},
},
// 恢复商品描述
recoveryDescribe
()
{
this
.
editForm
.
goodsDescList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
resType
==
2
)
{
this
.
editForm
.
describeTxt
=
item
.
content
}
else
{
this
.
editForm
.
descImgList
.
push
({
content
:
item
.
content
,
resType
:
1
,
bizType
:
2
})
}
})
},
// 恢复发送门店
recoveryMerchantList
()
{
this
.
editForm
.
supplyMerchantList
.
forEach
((
item
,
index
)
=>
{
item
.
merchantNo
=
item
.
merchantId
})
},
// 获取商品信息
getInfo
()
{
getInfo
()
{
// this.$apis.zoneList.getZoneInfoApi({ id: this.routeInfo.id }).then(res => {
this
.
$apis
.
proManage
.
getProInfoApi
({
id
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
// this.editForm.zoneName = res.zoneName
this
.
editForm
=
{
// this.editForm.zoneImg = res.zoneImg
...
res
,
goodsVideo
:
res
.
goodsVideo
||
''
,
classifyIdList
:
res
.
classifyList
.
map
(
item
=>
item
.
id
),
originalPrice
:
(
res
.
originalPrice
/
100
).
toFixed
(
2
),
retailPrice
:
res
.
retailPrice
?
(
res
.
retailPrice
/
100
).
toFixed
(
2
)
:
''
,
supplyPrice
:
res
.
supplyPrice
?
(
res
.
supplyPrice
/
100
).
toFixed
(
2
)
:
''
,
describeTxt
:
''
,
descImgList
:
[]
}
// 运费
if
(
this
.
editForm
.
deliveryType
==
2
)
{
this
.
editForm
.
expressFee
=
(
res
.
expressFee
/
100
).
toFixed
(
2
)
}
this
.
editForm
.
goodsDescList
.
length
&&
this
.
recoveryDescribe
()
this
.
editForm
.
supplyMerchantList
.
length
&&
this
.
recoveryMerchantList
()
console
.
log
(
this
.
editForm
)
// this.editForm.supplyMerchantList = res.merchantRefList
// this.editForm.supplyMerchantList = res.merchantRefList
// this.editForm.supplyMerchantList.forEach(item => {
// this.editForm.supplyMerchantList.forEach(item => {
// item.merchantNo = item.merchantId
// item.merchantNo = item.merchantId
// })
// })
//
})
})
},
},
getOptionsList
(
idx
,
formName
,
hasAll
=
true
,
refreshSigle
)
{
getOptionsList
(
idx
,
formName
,
hasAll
=
true
,
refreshSigle
)
{
if
(
refreshSigle
)
{
if
(
refreshSigle
)
{
...
@@ -608,7 +632,7 @@ export default {
...
@@ -608,7 +632,7 @@ export default {
},
},
handleCancel
()
{
handleCancel
()
{
this
.
$router
.
push
({
this
.
$router
.
push
({
path
:
'/productGroup
/index'
path
:
this
.
routeInfo
.
groupOrStore
==
1
?
'/productGroup/index'
:
'/productStore
/index'
})
})
}
}
}
}
...
...
src/views/productGroup/index.vue
View file @
409c480
...
@@ -218,7 +218,7 @@ export default {
...
@@ -218,7 +218,7 @@ export default {
// addOrEdit:1-新增;2-编辑;3-查看
// addOrEdit:1-新增;2-编辑;3-查看
// groupOrStore:1-集团;2-门店
// groupOrStore:1-集团;2-门店
handleEdit
(
addOrEdit
,
row
)
{
handleEdit
(
addOrEdit
,
row
)
{
addOrEdit
==
1
?
this
.
$router
.
push
(
'/productGroup/editProduct/'
+
addOrEdit
+
'/'
+
2
)
:
this
.
$router
.
push
(
'/productGroup/editProduct/'
+
addOrEdit
+
'/'
+
2
+
'/'
+
row
.
id
)
addOrEdit
==
1
?
this
.
$router
.
push
(
'/productGroup/editProduct/'
+
addOrEdit
+
'/'
+
1
)
:
this
.
$router
.
push
(
'/productGroup/editProduct/'
+
addOrEdit
+
'/'
+
1
+
'/'
+
row
.
id
)
},
},
handleUpOrDown
(
row
)
{
handleUpOrDown
(
row
)
{
if
(
row
.
goodsStatus
)
{
if
(
row
.
goodsStatus
)
{
...
...
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