Commit 298ed036 by cwq0219

车品牌

1 parent c7824bae
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 }
...@@ -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)
...@@ -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
} }
......
...@@ -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.carSmallBrandOptions" :key="item.carChildsBrandId" :value="item.carChildsBrandId" :label="item.carChildsBrandName"/> <el-option v-for="item in baseData.carSeriesOptions" :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.carSeriesOptions" :key="item.carSeriesId" :value="item.carSeriesId" :label="item.carSeriesName"/> <el-option v-for="item in baseData.carTypeOptions" :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: [],
carSmallBrandOptions: [], carSeriesOptions: [],
carSeriesOptions: [] carTypeOptions: []
} }
} }
}, },
...@@ -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() {
......
...@@ -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>
......
...@@ -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) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!