Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-discover
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 ca39bf88
authored
Dec 11, 2023
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交
1 parent
896d6276
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
184 additions
and
58 deletions
package-lock.json
package.json
src/api/modules/goods.js
src/views/goods/addPrefer.vue
src/views/goods/components/selectGoods.vue
src/views/goods/preferList.vue
package-lock.json
View file @
ca39bf8
...
@@ -1966,7 +1966,7 @@
...
@@ -1966,7 +1966,7 @@
}
}
},
},
"vue-loader-v16"
:
{
"vue-loader-v16"
:
{
"version"
:
"npm:vue-loader@16.8.3"
,
"version"
:
"npm:vue-loader
-v16
@16.8.3"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz"
,
"resolved"
:
"https://registry.npmjs.org/vue-loader/-/vue-loader-16.8.3.tgz"
,
"integrity"
:
"sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA=="
,
"integrity"
:
"sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA=="
,
"dev"
:
true
,
"dev"
:
true
,
...
@@ -8787,6 +8787,11 @@
...
@@ -8787,6 +8787,11 @@
"integrity"
:
"sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ=="
,
"integrity"
:
"sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ=="
,
"dev"
:
true
"dev"
:
true
},
},
"number-precision"
:
{
"version"
:
"1.6.0"
,
"resolved"
:
"https://registry.npmjs.org/number-precision/-/number-precision-1.6.0.tgz"
,
"integrity"
:
"sha512-05OLPgbgmnixJw+VvEh18yNPUo3iyp4BEWJcrLu4X9W05KmMifN7Mu5exYvQXqxxeNWhvIF+j3Rij+HmddM/hQ=="
},
"oauth-sign"
:
{
"oauth-sign"
:
{
"version"
:
"0.9.0"
,
"version"
:
"0.9.0"
,
"resolved"
:
"https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz"
,
"resolved"
:
"https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz"
,
...
...
package.json
View file @
ca39bf8
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
"element-ui"
:
"^2.4.5"
,
"element-ui"
:
"^2.4.5"
,
"glsx-common"
:
"^1.4.6"
,
"glsx-common"
:
"^1.4.6"
,
"glsx-components"
:
"^1.5.4"
,
"glsx-components"
:
"^1.5.4"
,
"number-precision"
:
"^1.6.0"
,
"vue"
:
"^2.6.10"
,
"vue"
:
"^2.6.10"
,
"vue-router"
:
"^3.1.3"
,
"vue-router"
:
"^3.1.3"
,
"vuex"
:
"^3.1.2"
,
"vuex"
:
"^3.1.2"
,
...
...
src/api/modules/goods.js
View file @
ca39bf8
...
@@ -129,7 +129,7 @@ const exportBrowseApi = (params, TYPE = 1) => {
...
@@ -129,7 +129,7 @@ const exportBrowseApi = (params, TYPE = 1) => {
data
:
params
,
data
:
params
,
sign
:
true
sign
:
true
})
})
}
}
const
exportGoodsApi
=
params
=>
{
const
exportGoodsApi
=
params
=>
{
params
.
method
=
'scrm.api.shopmall.goods.configuration.export'
params
.
method
=
'scrm.api.shopmall.goods.configuration.export'
...
@@ -151,6 +151,17 @@ const getSelfGoodsDetailApi = params => {
...
@@ -151,6 +151,17 @@ const getSelfGoodsDetailApi = params => {
})
})
}
}
/**
* 获取油劵列表
*/
const
getOilCouponListApi
=
params
=>
{
params
.
method
=
'scrm.api.shopmall.goods.oil.coupon.list'
params
.
status
=
1
return
http
({
url
,
data
:
params
})
}
export
default
{
export
default
{
getGoodsListApi
,
getGoodsListApi
,
updateGoodsStatusApi
,
updateGoodsStatusApi
,
...
@@ -165,5 +176,6 @@ export default {
...
@@ -165,5 +176,6 @@ export default {
getSharedListApi
,
getSharedListApi
,
exportBrowseApi
,
exportBrowseApi
,
exportGoodsApi
,
exportGoodsApi
,
getSelfGoodsDetailApi
getSelfGoodsDetailApi
,
getOilCouponListApi
}
}
\ No newline at end of file
\ No newline at end of file
src/views/goods/addPrefer.vue
View file @
ca39bf8
This diff is collapsed.
Click to expand it.
src/views/goods/components/selectGoods.vue
View file @
ca39bf8
<
template
>
<
template
>
<div
class=
"select-store"
>
<div
class=
"select-store"
>
<GLDialog
bigTitle=
"选择商品"
<GLDialog
bigTitle=
"选择商品"
mode=
"big"
mode=
"big"
:visible
.
sync=
"dialogVisible"
:visible
.
sync=
"dialogVisible"
:before-close=
"handleClose"
:before-close=
"handleClose"
:close-on-click-modal=
"false"
:close-on-click-modal=
"false"
@
onOk=
"handleConfirm"
@
onOk=
"handleConfirm"
@
onCancel=
"handleClose"
>
@
onCancel=
"handleClose"
<glsx-combi-form
ref=
"showSearch"
>
<glsx-combi-form
ref=
"showSearch"
labelWidth=
"105px"
labelWidth=
"105px"
:formObj=
"searchForm"
:formObj=
"searchForm"
:formData=
"searchFormData"
>
:formData=
"searchFormData"
>
<span
slot=
"footer"
>
<span
slot=
"footer"
>
<el-button
:size=
"size"
<el-button
:size=
"size"
type=
"primary"
type=
"primary"
@
click=
"resetTable"
>
查询
</el-button>
@
click=
"resetTable"
<el-button
:size=
"size"
v-if=
"goodsInfo.goodsSource==2"
>
查询
</el-button>
@
click=
"resetSearch"
>
重置
</el-button>
<el-button
:size=
"size"
v-if=
"goodsInfo.goodsSource==2"
@
click=
"resetSearch"
>
重置
</el-button>
</span>
</span>
</glsx-combi-form>
</glsx-combi-form>
<GLTable
ref=
"goodsRef"
<GLTable
ref=
"goodsRef"
:noDataImg=
"url"
:noDataImg=
"url"
:searchForm=
"searchForm"
:searchForm=
"searchForm"
:tableParams=
"tableParams"
:tableParams=
"tableParams"
...
@@ -29,29 +39,81 @@
...
@@ -29,29 +39,81 @@
:getListApi=
"getListApi"
:getListApi=
"getListApi"
:pageSizes=
"pageSizes"
:pageSizes=
"pageSizes"
:hasNum=
"false"
:hasNum=
"false"
:setTableFinishFun=
"setTableFinishFun"
>
:setTableFinishFun=
"setTableFinishFun"
<div
slot=
"radioHtml"
>
<div
slot=
"radioHtml"
class=
"store-table"
class=
"store-table"
slot-scope=
"scope"
>
slot-scope=
"scope"
<el-radio
v-model=
"curInfo.id"
>
<el-radio
v-model=
"curInfo.id"
:label=
"scope.scope.id"
:label=
"scope.scope.id"
@
click
.
native=
"handleClick(scope.scope)"
></el-radio>
@
click
.
native=
"handleClick(scope.scope)"
></el-radio>
</div>
</div>
<div
slot=
"selfRadioHtml"
<div
slot=
"selfRadioHtml"
class=
"store-table"
class=
"store-table"
slot-scope=
"scope"
>
slot-scope=
"scope"
<el-radio
v-model=
"curInfo.goodsId"
>
<el-radio
v-model=
"curInfo.goodsId"
:label=
"scope.scope.goodsId"
:label=
"scope.scope.goodsId"
@
click
.
native=
"handleClick(scope.scope)"
></el-radio>
@
click
.
native=
"handleClick(scope.scope)"
></el-radio>
</div>
</div>
<div
slot=
"imageSlot"
slot-scope=
"scope"
>
<div
<el-popover
placement=
"top"
width=
"160"
trigger=
"hover"
popper-class=
"table-popover-block"
>
slot=
"imageSlot"
<img
class=
"table-popover-img"
:src=
"scope.scope.goodsImage"
/>
slot-scope=
"scope"
<img
class=
"img-36 pointer"
slot=
"reference"
:src=
"scope.scope.goodsImage"
/>
>
<el-popover
placement=
"top"
width=
"160"
trigger=
"hover"
popper-class=
"table-popover-block"
>
<img
class=
"table-popover-img"
:src=
"scope.scope.goodsImage"
/>
<img
class=
"img-36 pointer"
slot=
"reference"
:src=
"scope.scope.goodsImage"
/>
</el-popover>
</el-popover>
</div>
</div>
<div
slot=
"goodsNameSlot"
class=
"goodsNameSlot"
slot-scope=
"scope"
>
<template
<img
:src=
"scope.scope.goodsImage"
alt=
""
>
{{
scope
.
scope
.
goodsName
}}
slot=
"gasImageSlot"
slot-scope=
"scope"
>
<el-popover
placement=
"top"
width=
"160"
trigger=
"hover"
popper-class=
"table-popover-block"
>
<img
class=
"table-popover-img"
:src=
"scope.scope.aliasUrl"
/>
<img
class=
"img-36 pointer"
slot=
"reference"
:src=
"scope.scope.aliasUrl"
/>
</el-popover>
</
template
>
<div
slot=
"goodsNameSlot"
class=
"goodsNameSlot"
slot-scope=
"scope"
>
<img
:src=
"scope.scope.goodsImage"
alt=
""
>
{{ scope.scope.goodsName }}
</div>
</div>
</GLTable>
</GLTable>
</GLDialog>
</GLDialog>
...
@@ -67,7 +129,7 @@ const MERCHANT_SEARCH_ITEM = {
...
@@ -67,7 +129,7 @@ const MERCHANT_SEARCH_ITEM = {
width
:
'200px'
,
width
:
'200px'
,
labelWidth
:
'10px'
,
labelWidth
:
'10px'
,
isClear
:
true
isClear
:
true
}
}
const
defaultTableCol
=
[
const
defaultTableCol
=
[
{
{
label
:
''
,
label
:
''
,
...
@@ -86,10 +148,10 @@ const defaultTableCol = [
...
@@ -86,10 +148,10 @@ const defaultTableCol = [
{
{
label
:
'价格(元)'
,
label
:
'价格(元)'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
retailPrice
?
Number
(
Number
(
cellValue
.
retailPrice
/
100
).
toFixed
(
2
))
:
'--'
return
cellValue
.
retailPrice
?
Number
(
Number
(
cellValue
.
retailPrice
/
100
).
toFixed
(
2
))
:
'--'
}
}
}
}
]
]
const
merchantGoodsTableCol
=
[
const
merchantGoodsTableCol
=
[
{
{
...
@@ -109,19 +171,57 @@ const merchantGoodsTableCol = [
...
@@ -109,19 +171,57 @@ const merchantGoodsTableCol = [
{
{
label
:
'零售价(元)'
,
label
:
'零售价(元)'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
retailPrice
?
Number
(
Number
(
cellValue
.
retailPrice
/
100
).
toFixed
(
2
))
:
'--'
return
cellValue
.
retailPrice
?
Number
(
Number
(
cellValue
.
retailPrice
/
100
).
toFixed
(
2
))
:
'--'
}
}
},
},
{
{
label
:
'划线价(元)'
,
label
:
'划线价(元)'
,
formatter
:
cellValue
=>
{
formatter
:
cellValue
=>
{
return
cellValue
.
originalPrice
?
Number
(
Number
(
cellValue
.
originalPrice
/
100
).
toFixed
(
2
))
:
'--'
return
cellValue
.
originalPrice
?
Number
(
Number
(
cellValue
.
originalPrice
/
100
).
toFixed
(
2
))
:
'--'
}
}
}
}
]
]
const
gasGoodsTableCol
=
[
{
label
:
''
,
prop
:
''
,
width
:
80
,
addHtml
:
'radioHtml'
},
{
label
:
'商品编码'
,
prop
:
'alias'
},
{
label
:
'商品图片'
,
addHtml
:
'gasImageSlot'
},
{
label
:
'商品信息'
,
prop
:
'aliasName'
},
{
label
:
'销售价/元'
,
formatter
:
cellValue
=>
{
return
cellValue
.
salesPrice
?
Number
(
Number
(
cellValue
.
salesPrice
/
100
).
toFixed
(
2
))
:
'--'
}
},
{
label
:
'面额/元'
,
prop
:
'faceValue'
},
{
label
:
'成本/元'
,
prop
:
'sellPrice'
},
{
label
:
'库存'
,
prop
:
'stock'
},
]
export
default
{
export
default
{
name
:
'selectStore'
,
name
:
'selectStore'
,
data
()
{
data
()
{
return
{
return
{
url
:
url
,
url
:
url
,
searchForm
:
{
searchForm
:
{
...
@@ -149,17 +249,16 @@ export default {
...
@@ -149,17 +249,16 @@ export default {
pageSize
:
10
,
pageSize
:
10
,
pageNum
:
1
pageNum
:
1
},
},
getListApi
:
this
.
$apis
.
goods
.
getCarlifeGoodsApi
,
getListApi
:
null
,
tableParams
:
{
tableParams
:
{
listName
:
'list'
,
listName
:
'list'
,
tableColumns
:
defaultTableCol
tableColumns
:
{}
},
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'total'
},
pageSizes
:
[
5
,
10
,
20
,
30
,
40
],
pageSizes
:
[
5
,
10
,
20
,
30
,
40
],
baseData
:
{}
baseData
:
{}
}
}
},
},
props
:
{
props
:
{
dialogVisible
:
{
dialogVisible
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -167,17 +266,17 @@ export default {
...
@@ -167,17 +266,17 @@ export default {
},
},
routeInfo
:
{
routeInfo
:
{
type
:
Object
,
type
:
Object
,
default
:
()
=>
{
}
default
:
()
=>
{
}
},
},
storeSearchForm
:
{
storeSearchForm
:
{
type
:
Object
type
:
Object
},
},
goodsInfo
:
{
goodsInfo
:
{
required
:
true
,
required
:
true
,
default
:
()
=>
{
}
default
:
()
=>
{
}
}
}
},
},
created
()
{
created
()
{
// let { smartcarlifeInfoId, goodsName, coverList, goodsImage, minSellPrice, retailPrice } = this.goodsInfo || {}
// let { smartcarlifeInfoId, goodsName, coverList, goodsImage, minSellPrice, retailPrice } = this.goodsInfo || {}
// this.curInfo = {
// this.curInfo = {
// id: smartcarlifeInfoId,
// id: smartcarlifeInfoId,
...
@@ -186,25 +285,34 @@ export default {
...
@@ -186,25 +285,34 @@ export default {
// minSellPrice: minSellPrice ? Number(Number(minSellPrice*10*10).toFixed(0)) : 0,
// minSellPrice: minSellPrice ? Number(Number(minSellPrice*10*10).toFixed(0)) : 0,
// retailPrice: retailPrice ? Number(Number(retailPrice*10*10).toFixed(0)) : 0,
// retailPrice: retailPrice ? Number(Number(retailPrice*10*10).toFixed(0)) : 0,
// }
// }
const
{
goodsSource
}
=
this
.
goodsInfo
this
.
searchForm
.
discoverGoodsId
=
this
.
routeInfo
.
type
==
2
?
this
.
routeInfo
.
id
:
''
//1查看,2编辑,空是新增,编辑进来要传id
this
.
searchForm
.
discoverGoodsId
=
this
.
routeInfo
.
type
==
2
?
this
.
routeInfo
.
id
:
''
//1查看,2编辑,空是新增,编辑进来要传id
this
.
searchForm
.
goodsType
=
this
.
routeInfo
.
goodsType
// 1是配置 2是车主
this
.
searchForm
.
goodsType
=
this
.
routeInfo
.
goodsType
// 1是配置 2是车主
if
(
this
.
goodsInfo
.
goodsSource
==
2
)
{
//来源是门店自营的搜素和列表字段都要改
if
(
goodsSource
==
2
)
{
//来源是门店自营的搜素和列表字段都要改
this
.
searchFormData
.
push
(
MERCHANT_SEARCH_ITEM
)
this
.
searchFormData
.
push
(
MERCHANT_SEARCH_ITEM
)
this
.
tableParams
.
tableColumns
=
merchantGoodsTableCol
this
.
getListApi
=
this
.
$apis
.
goods
.
getSelfSupportGoodsApi
}
}
this
.
tableParams
.
tableColumns
=
{
1
:
defaultTableCol
,
2
:
merchantGoodsTableCol
,
3
:
gasGoodsTableCol
}[
goodsSource
]
this
.
getListApi
=
this
.
$apis
.
goods
[{
1
:
'getCarlifeGoodsApi'
,
2
:
'getSelfSupportGoodsApi'
,
3
:
'getOilCouponListApi'
}[
goodsSource
]]
},
},
mounted
()
{
mounted
()
{
let
clientHeight
=
document
.
documentElement
.
clientHeight
let
clientHeight
=
document
.
documentElement
.
clientHeight
this
.
heightBox
=
clientHeight
-
0.15
*
clientHeight
-
425
this
.
heightBox
=
clientHeight
-
0.15
*
clientHeight
-
425
},
},
methods
:
{
methods
:
{
resetTable
()
{
resetTable
()
{
this
.
$refs
.
goodsRef
.
refreshTable
()
this
.
$refs
.
goodsRef
.
refreshTable
()
},
},
resetSearch
()
{
resetSearch
()
{
this
.
searchForm
=
{
this
.
searchForm
=
{
goodsName
:
''
,
goodsName
:
''
,
discoverGoodsId
:
''
,
discoverGoodsId
:
''
,
...
@@ -212,44 +320,44 @@ export default {
...
@@ -212,44 +320,44 @@ export default {
}
}
this
.
resetTable
()
this
.
resetTable
()
},
},
beforeSearchFn
()
{
beforeSearchFn
()
{
return
new
Promise
(
resolve
=>
{
return
new
Promise
(
resolve
=>
{
if
(
this
.
goodsInfo
.
goodsSource
==
2
)
{
if
(
this
.
goodsInfo
.
goodsSource
==
2
)
{
delete
this
.
searchForm
.
goodsType
delete
this
.
searchForm
.
goodsType
}
}
resolve
()
resolve
()
})
})
},
},
setTableFinishFun
()
{
setTableFinishFun
()
{
this
.
$refs
.
goodsRef
.
tableHeightValues
=
'460px'
this
.
$refs
.
goodsRef
.
tableHeightValues
=
'460px'
},
},
handleClick
(
item
)
{
handleClick
(
item
)
{
console
.
log
(
item
)
console
.
log
(
item
)
this
.
curInfo
=
item
this
.
curInfo
=
item
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'handleGoodsClose'
)
this
.
$emit
(
'handleGoodsClose'
)
},
},
handleConfirm
()
{
handleConfirm
()
{
this
.
$emit
(
'handleGoodsConfirm'
,
this
.
curInfo
)
if
(
Object
.
keys
(
this
.
curInfo
).
length
)
this
.
$emit
(
'handleGoodsConfirm'
,
this
.
curInfo
)
}
}
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
/
deep
/
.glsx-combi-form
.el-form
{
/
deep
/
.glsx-combi-form
.el-form
{
.el-form-item{
.el-form-item
{
margin-right
:
12px
!important
;
margin-right
:
12px
!important
;
}
}
.el-button
{
.el-button
{
margin-top
:
1px
;
margin-top
:
1px
;
}
}
}
}
.goodsNameSlot
{
.goodsNameSlot
{
img{
img
{
width
:
36px
;
width
:
36px
;
height
:
36px
;
height
:
36px
;
vertical-align
:
middle
;
vertical-align
:
middle
;
...
...
src/views/goods/preferList.vue
View file @
ca39bf8
This diff is collapsed.
Click to expand it.
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