Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-services
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 298ed036
authored
Nov 20, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
车品牌
1 parent
c7824bae
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
25 deletions
src/api/modules/beforeSale.js
src/main.js
src/setup/single.js
src/views/beforeSale/editEquity.vue
src/views/beforeSale/index.vue
src/views/beforeSale/serviceSet.vue
src/api/modules/beforeSale.js
View file @
298ed03
import
{
http
}
from
'@/main'
import
{
http
,
http_brand
}
from
'@/main'
const
defaultPath
=
'scrm.api.equity.service.package.'
const
defaultPath
=
'scrm.api.equity.service.package.'
const
orderPath
=
'scrm.api.equity.service.order.'
const
orderPath
=
'scrm.api.equity.service.order.'
...
@@ -26,7 +26,27 @@ const getExportApi = params => {
...
@@ -26,7 +26,27 @@ const getExportApi = params => {
const
getCarBrandListApi
=
params
=>
{
const
getCarBrandListApi
=
params
=>
{
// params.method = 'dj.api.car.series.list'
// params.method = 'dj.api.car.series.list'
params
.
method
=
'scrm.api.carlife.common.getCarBrandList'
params
.
method
=
'scrm.api.carlife.common.getCarBrandList'
return
http
({
return
http_brand
({
url
:
'rop-scrm-carlife/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
getCarSeriesListApi
=
params
=>
{
params
.
method
=
'scrm.api.carlife.common.getCarSeriesList'
return
http_brand
({
url
:
'rop-scrm-carlife/router'
,
method
:
'GET'
,
data
:
params
,
sign
:
true
})
}
const
getCarTypeListApi
=
params
=>
{
params
.
method
=
'scrm.api.carlife.common.getCarTypeList'
return
http_brand
({
url
:
'rop-scrm-carlife/router'
,
url
:
'rop-scrm-carlife/router'
,
method
:
'GET'
,
method
:
'GET'
,
data
:
params
,
data
:
params
,
...
@@ -34,10 +54,20 @@ const getCarBrandListApi = params => {
...
@@ -34,10 +54,20 @@ const getCarBrandListApi = params => {
})
})
}
}
const
getHotlineApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
merchant.hotline.get`
return
http
({
url
:
'rop-scrm-equity/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
updateHotlineApi
=
params
=>
{
const
updateHotlineApi
=
params
=>
{
params
.
method
=
`
${
defaultPath
}
merchant.hotline.update`
params
.
method
=
`
${
defaultPath
}
merchant.hotline.update`
return
http
({
return
http
({
url
:
'rop-scrm-
shopmall
/router'
,
url
:
'rop-scrm-
equity
/router'
,
method
:
'POST'
,
method
:
'POST'
,
data
:
params
,
data
:
params
,
sign
:
true
,
sign
:
true
,
...
@@ -78,4 +108,4 @@ const createCodeApi = params => {
...
@@ -78,4 +108,4 @@ const createCodeApi = params => {
})
})
}
}
export
default
{
getListApi
,
getExportApi
,
getCarBrandListApi
,
updateHotlineApi
,
getPackageListApi
,
updateEquityApi
,
createCodeApi
}
export
default
{
getListApi
,
getExportApi
,
getCarBrandListApi
,
getCarTypeListApi
,
getCarSeriesListApi
,
getHotlineApi
,
updateHotlineApi
,
getPackageListApi
,
updateEquityApi
,
createCodeApi
}
src/main.js
View file @
298ed03
...
@@ -18,3 +18,4 @@ Vue.prototype.$apis = apis
...
@@ -18,3 +18,4 @@ Vue.prototype.$apis = apis
start
()
start
()
export
{
bootstrap
,
mount
,
unmount
}
from
'@/setup'
export
{
bootstrap
,
mount
,
unmount
}
from
'@/setup'
export
const
http
=
params
=>
Vue
.
prototype
.
$http
(
params
)
export
const
http
=
params
=>
Vue
.
prototype
.
$http
(
params
)
export
const
http_brand
=
params
=>
Vue
.
prototype
.
$http_brand
(
params
)
src/setup/single.js
View file @
298ed03
...
@@ -16,7 +16,7 @@ import render from './render'
...
@@ -16,7 +16,7 @@ import render from './render'
import
{
routes
}
from
'@/router'
import
{
routes
}
from
'@/router'
export
async
function
start
()
{
export
async
function
start
()
{
if
(
window
.
__POWERED_BY_QIANKUN__
)
return
if
(
window
.
__POWERED_BY_QIANKUN__
)
return
const
{
response
,
request
,
sign
,
secret
}
=
await
fetchConfig
()
const
{
response
,
request
,
request_brand
,
sign
,
secret
}
=
await
fetchConfig
()
var
urlParams
=
{}
var
urlParams
=
{}
window
.
location
.
href
.
split
(
'?'
).
length
>
1
window
.
location
.
href
.
split
(
'?'
).
length
>
1
?
window
.
location
.
href
?
window
.
location
.
href
...
@@ -28,6 +28,7 @@ export async function start() {
...
@@ -28,6 +28,7 @@ export async function start() {
:
''
:
''
var
token
=
Object
.
keys
(
urlParams
).
includes
(
'sessionId'
)
?
urlParams
.
sessionId
:
'1112223333444'
var
token
=
Object
.
keys
(
urlParams
).
includes
(
'sessionId'
)
?
urlParams
.
sessionId
:
'1112223333444'
Vue
.
prototype
.
$http
=
new
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
token
}
})
Vue
.
prototype
.
$http
=
new
Http
({
response
,
request
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
token
}
})
Vue
.
prototype
.
$http_brand
=
new
Http
({
response
,
request
:
request_brand
,
sign
,
secret
,
alert
:
message
.
error
,
headers
:
{
token
:
token
}
})
Vue
.
prototype
.
$common
=
{
Vue
.
prototype
.
$common
=
{
utils
:
utils
utils
:
utils
}
}
...
...
src/views/beforeSale/editEquity.vue
View file @
298ed03
...
@@ -4,15 +4,15 @@
...
@@ -4,15 +4,15 @@
<div
class=
"container"
>
<div
class=
"container"
>
<p
class=
"edit-title"
>
车辆信息
</p>
<p
class=
"edit-title"
>
车辆信息
</p>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRefCar"
labelWidth=
"140px"
formRef=
"editChildRefCar"
:formObj
.
sync=
"editForm.vehicle"
:formData=
"editFormDataCar"
:formRules=
"editRuleCar"
>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRefCar"
labelWidth=
"140px"
formRef=
"editChildRefCar"
:formObj
.
sync=
"editForm.vehicle"
:formData=
"editFormDataCar"
:formRules=
"editRuleCar"
>
<template
slot=
"vehicleBrandId"
slot-scope=
"scope"
>
<template
slot=
"vehicleBrandId"
>
<el-select
v-model=
"editForm.vehicle.vehicleBrandId"
placeholder=
"请选择品牌"
filterable
@
change=
"
scope.scope.changeCarBrand
(editForm.vehicle.vehicleBrandId)"
style=
"width:220px; margin-right: 20px;"
>
<el-select
v-model=
"editForm.vehicle.vehicleBrandId"
placeholder=
"请选择品牌"
filterable
@
change=
"
getCarSeriesList
(editForm.vehicle.vehicleBrandId)"
style=
"width:220px; margin-right: 20px;"
>
<el-option
v-for=
"item in baseData.carBrandOptions"
:key=
"item.
carBrandId"
:value=
"item.carBrandId"
:label=
"item.carBrand"
/>
<el-option
v-for=
"item in baseData.carBrandOptions"
:key=
"item.
id"
:value=
"item.id"
:label=
"item.name"
/>
</el-select>
</el-select>
<el-select
v-model=
"editForm.vehicle.vehicleSeriesId"
placeholder=
"请选择
子品牌"
@
change=
"changeCarSmallBrand
(editForm.vehicle.vehicleSeriesId)"
style=
"width:220px; margin-right: 20px;"
>
<el-select
v-model=
"editForm.vehicle.vehicleSeriesId"
placeholder=
"请选择
车系"
@
change=
"getCarTypeList
(editForm.vehicle.vehicleSeriesId)"
style=
"width:220px; margin-right: 20px;"
>
<el-option
v-for=
"item in baseData.carS
mallBrandOptions"
:key=
"item.carChildsBrandId"
:value=
"item.carChildsBrandId"
:label=
"item.carChildsBrandName"
/>
<el-option
v-for=
"item in baseData.carS
eriesOptions"
:key=
"item.carChildsBrandId"
:value=
"item.carChildsBrandId"
:label=
"item.carChildsBrandName"
/>
</el-select>
</el-select>
<el-select
v-model=
"editForm.vehicle.vehicleShapeId"
placeholder=
"请选择车
系"
@
change=
"getCarType(editForm.vehicle.vehicleShapeId)
"
style=
"width:220px;"
>
<el-select
v-model=
"editForm.vehicle.vehicleShapeId"
placeholder=
"请选择车
型
"
style=
"width:220px;"
>
<el-option
v-for=
"item in baseData.car
SeriesOptions"
:key=
"item.carSeriesId"
:value=
"item.carSeriesId"
:label=
"item.carSeriesName"
/>
<el-option
v-for=
"item in baseData.car
TypeOptions"
:key=
"item.carSeriesId"
:value=
"item.carSeriesId"
:label=
"item.carSeriesName"
/>
</el-select>
</el-select>
</
template
>
</
template
>
</glsx-combi-form>
</glsx-combi-form>
...
@@ -368,8 +368,8 @@ export default {
...
@@ -368,8 +368,8 @@ export default {
}
}
],
],
carBrandOptions
:
[],
carBrandOptions
:
[],
carS
mallBrand
Options
:
[],
carS
eries
Options
:
[],
car
Series
Options
:
[]
car
Type
Options
:
[]
}
}
}
}
},
},
...
@@ -389,7 +389,7 @@ export default {
...
@@ -389,7 +389,7 @@ export default {
console
.
log
(
this
.
routeInfo
,
'-------------'
)
console
.
log
(
this
.
routeInfo
,
'-------------'
)
// 获取套餐列表
// 获取套餐列表
this
.
getPackageList
()
this
.
getPackageList
()
//
this.getAllVehicleBrand()
this
.
getAllVehicleBrand
()
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getInfo
()
:
''
this
.
routeInfo
.
addOrEdit
!=
1
?
this
.
getInfo
()
:
''
},
},
...
@@ -524,13 +524,24 @@ export default {
...
@@ -524,13 +524,24 @@ export default {
const
params
=
{}
const
params
=
{}
this
.
$apis
.
beforeSale
.
getCarBrandListApi
(
params
).
then
(
res
=>
{
this
.
$apis
.
beforeSale
.
getCarBrandListApi
(
params
).
then
(
res
=>
{
this
.
baseData
.
carBrandOptions
=
res
||
[]
this
.
baseData
.
carBrandOptions
=
res
||
[]
// this.carInfoList = this.$common.util.deepClone(this.baseData.carBrandOptions)
})
// var hash = {}
},
// this.carBrandOptions = this.carBrandOptions.reduce((item, next) => {
// 获取车系
// !hash[next.carBrandId] && (hash[next.carBrandId] = true) && item.push(next)
getCarSeriesList
(
brandId
)
{
// return item
const
params
=
{
// }, [])
brandId
:
brandId
// fn()
}
this
.
$apis
.
beforeSale
.
getCarSeriesListApi
(
params
).
then
(
res
=>
{
this
.
baseData
.
carSeriesOptions
=
res
||
[]
})
},
// 获取车型
getCarTypeList
(
value
)
{
const
params
=
{
carSeriesId
:
value
}
this
.
$apis
.
beforeSale
.
getCarTypeListApi
(
params
).
then
(
res
=>
{
this
.
baseData
.
carTypeOptions
=
res
||
[]
})
})
},
},
getParams
()
{
getParams
()
{
...
...
src/views/beforeSale/index.vue
View file @
298ed03
...
@@ -3,10 +3,10 @@
...
@@ -3,10 +3,10 @@
<div
class=
"equity"
>
<div
class=
"equity"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tabs
v-model=
"activeName"
@
tab-click=
"handleClick"
>
<el-tab-pane
label=
"其他权益订单"
name=
"equityList"
>
<el-tab-pane
label=
"其他权益订单"
name=
"equityList"
>
<equity-list></equity-list>
<equity-list
v-if=
"activeName == 'equityList'"
></equity-list>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"店面服务设置"
name=
"serviceSet"
>
<el-tab-pane
label=
"店面服务设置"
name=
"serviceSet"
>
<service-set></service-set>
<service-set
v-if=
"activeName == 'serviceSet'"
></service-set>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</div>
</div>
...
...
src/views/beforeSale/serviceSet.vue
View file @
298ed03
...
@@ -46,9 +46,16 @@ export default {
...
@@ -46,9 +46,16 @@ export default {
glsxCombiForm
glsxCombiForm
},
},
mounted
()
{},
mounted
()
{
this
.
getHotline
()
},
methods
:
{
methods
:
{
getHotline
()
{
this
.
$apis
.
beforeSale
.
getHotlineApi
({}).
then
(
res
=>
{
this
.
editForm
.
hotline
=
res
})
},
handleConfirm
()
{
handleConfirm
()
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
if
(
valid
)
{
if
(
valid
)
{
...
...
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