Commit 641d7297 by 杨北旺

更换接口入口

1 parent 6619bbf2
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.'
...@@ -67,7 +67,7 @@ const getPriteApi = params => { ...@@ -67,7 +67,7 @@ const getPriteApi = 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', url: 'rop-scrm-carlife/router',
method: 'GET', method: 'GET',
data: params, data: params,
...@@ -78,7 +78,7 @@ const getCarBrandListApi = params => { ...@@ -78,7 +78,7 @@ const getCarBrandListApi = params => {
const getCarChildListApi = params => { const getCarChildListApi = params => {
// params.method = 'dj.api.car.series.list' // params.method = 'dj.api.car.series.list'
params.method = 'scrm.api.carlife.common.getOnlyCarBrandList' params.method = 'scrm.api.carlife.common.getOnlyCarBrandList'
return http({ return http_brand({
url: 'rop-scrm-carlife/router', url: 'rop-scrm-carlife/router',
method: 'GET', method: 'GET',
data: params, data: params,
...@@ -88,7 +88,7 @@ const getCarChildListApi = params => { ...@@ -88,7 +88,7 @@ const getCarChildListApi = params => {
const getCarSeriesListApi = params => { const getCarSeriesListApi = params => {
params.method = 'scrm.api.carlife.common.getCarSeriesList' params.method = 'scrm.api.carlife.common.getCarSeriesList'
return http({ return http_brand({
url: 'rop-scrm-carlife/router', url: 'rop-scrm-carlife/router',
method: 'GET', method: 'GET',
data: params, data: params,
...@@ -98,7 +98,7 @@ const getCarSeriesListApi = params => { ...@@ -98,7 +98,7 @@ const getCarSeriesListApi = params => {
const getCarTypeListApi = params => { const getCarTypeListApi = params => {
params.method = 'scrm.api.carlife.common.getCarTypeList' params.method = 'scrm.api.carlife.common.getCarTypeList'
return http({ return http_brand({
url: 'rop-scrm-carlife/router', url: 'rop-scrm-carlife/router',
method: 'GET', method: 'GET',
data: params, data: params,
...@@ -107,7 +107,8 @@ const getCarTypeListApi = params => { ...@@ -107,7 +107,8 @@ const getCarTypeListApi = params => {
} }
const getHotlineApi = params => { const getHotlineApi = params => {
params.method = `${defaultPath}merchant.hotline.get` //params.method = `${defaultPath}merchant.hotline.get`
params.method = `${defaultPath}merchant.config.get`
return http({ return http({
url: 'rop-scrm-equity/router', url: 'rop-scrm-equity/router',
method: 'POST', method: 'POST',
......
...@@ -543,7 +543,7 @@ export default { ...@@ -543,7 +543,7 @@ export default {
}, },
handleCancelBubble(e) { }, handleCancelBubble(e) { },
getDefaultCarbrand() { getDefaultCarbrand() {
this.$apis.beforeSale.getDefaultCarbrandApi({}).then(res => { this.$apis.ghBeforeSale.getDefaultCarbrandApi({}).then(res => {
// 获取套餐列表 // 获取套餐列表
this.getPackageList() this.getPackageList()
if (res) { if (res) {
...@@ -563,7 +563,7 @@ export default { ...@@ -563,7 +563,7 @@ export default {
}) })
}, },
getInfo() { getInfo() {
this.$apis.beforeSale.getEquityApi({ contractNo: this.routeInfo.contractNo }).then(res => { this.$apis.ghBeforeSale.getEquityApi({ contractNo: this.routeInfo.contractNo }).then(res => {
// console.log(res) // console.log(res)
this.editForm = { this.editForm = {
...res ...res
...@@ -608,7 +608,7 @@ export default { ...@@ -608,7 +608,7 @@ export default {
}) })
}, },
getPackageList() { getPackageList() {
this.$apis.beforeSale.getPackageListApi({}).then(res => { this.$apis.ghBeforeSale.getPackageListApi({}).then(res => {
this.packageList = res this.packageList = res
this.autoGenerate() this.autoGenerate()
}) })
...@@ -755,7 +755,7 @@ export default { ...@@ -755,7 +755,7 @@ export default {
// 获取品牌车型 // 获取品牌车型
getAllVehicleBrand(fn = () => { }) { getAllVehicleBrand(fn = () => { }) {
const params = {} const params = {}
this.$apis.beforeSale.getCarBrandListApi(params).then(res => { this.$apis.ghBeforeSale.getCarBrandListApi(params).then(res => {
this.baseData.carBrandOptions = res || [] this.baseData.carBrandOptions = res || []
}) })
}, },
...@@ -769,7 +769,7 @@ export default { ...@@ -769,7 +769,7 @@ export default {
}, },
// 获取子品牌 // 获取子品牌
getCarChildList(isRecovery = false, isDefault = false) { getCarChildList(isRecovery = false, isDefault = false) {
this.$apis.beforeSale.getCarChildListApi({}).then(res => { this.$apis.ghBeforeSale.getCarChildListApi({}).then(res => {
this.allCarChildList = res || [] this.allCarChildList = res || []
if (isRecovery) { if (isRecovery) {
this.baseData.carChildOptions = this.allCarChildList.find(item => item.id == this.editForm.vehicle.vehicleBrandId).childs this.baseData.carChildOptions = this.allCarChildList.find(item => item.id == this.editForm.vehicle.vehicleBrandId).childs
...@@ -789,7 +789,7 @@ export default { ...@@ -789,7 +789,7 @@ export default {
brandId: this.editForm.vehicle.vehicleBrandId, brandId: this.editForm.vehicle.vehicleBrandId,
childBrandId: this.editForm.vehicle.vehicleSubBrandId childBrandId: this.editForm.vehicle.vehicleSubBrandId
} }
this.$apis.beforeSale.getCarSeriesListApi(params).then(res => { this.$apis.ghBeforeSale.getCarSeriesListApi(params).then(res => {
this.baseData.carSeriesOptions = res || [] this.baseData.carSeriesOptions = res || []
}) })
}, },
...@@ -802,7 +802,7 @@ export default { ...@@ -802,7 +802,7 @@ export default {
const params = { const params = {
carSeriesId: this.editForm.vehicle.vehicleSeriesId carSeriesId: this.editForm.vehicle.vehicleSeriesId
} }
this.$apis.beforeSale.getCarTypeListApi(params).then(res => { this.$apis.ghBeforeSale.getCarTypeListApi(params).then(res => {
this.baseData.carTypeOptions = res || [] this.baseData.carTypeOptions = res || []
}) })
}, },
...@@ -889,7 +889,7 @@ export default { ...@@ -889,7 +889,7 @@ export default {
this.updateEquity(params) this.updateEquity(params)
}, },
updateEquity(params) { updateEquity(params) {
this.$apis.beforeSale.updateEquityApi(params).then(res => { this.$apis.ghBeforeSale.updateEquityApi(params).then(res => {
this.submit = false this.submit = false
if (res.errId == 'A1307') { if (res.errId == 'A1307') {
this.whereToGo('vin') this.whereToGo('vin')
...@@ -939,7 +939,7 @@ export default { ...@@ -939,7 +939,7 @@ export default {
} else { } else {
params.contractNo = '' params.contractNo = ''
} }
this.$apis.beforeSale.checkOrderApi({ vin: this.editForm.vehicle.vin, contractNo: this.routeInfo.contractNo || '' }).then(res => { this.$apis.ghBeforeSale.checkOrderApi({ vin: this.editForm.vehicle.vin, contractNo: this.routeInfo.contractNo || '' }).then(res => {
if (res.code == '0') { if (res.code == '0') {
this.updateEquity(params) this.updateEquity(params)
} else { } else {
...@@ -978,7 +978,7 @@ export default { ...@@ -978,7 +978,7 @@ export default {
billingDate: new Date() billingDate: new Date()
} }
} }
this.$apis.beforeSale.getDefaultCarbrandApi({}).then(res => { this.$apis.ghBeforeSale.getDefaultCarbrandApi({}).then(res => {
if (res) { if (res) {
this.defaultBrandForm.vehicleBrandId = res.vehicleBrandId this.defaultBrandForm.vehicleBrandId = res.vehicleBrandId
this.defaultBrandForm.vehicleSubBrandId = res.vehicleSubBrandId this.defaultBrandForm.vehicleSubBrandId = res.vehicleSubBrandId
......
...@@ -258,7 +258,7 @@ export default { ...@@ -258,7 +258,7 @@ export default {
} }
], ],
// 表格 // 表格
getListApi: this.$apis.beforeSale.getListApi, getListApi: this.$apis.ghBeforeSale.getListApi,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: false, tableOption: false,
...@@ -529,12 +529,12 @@ export default { ...@@ -529,12 +529,12 @@ export default {
this.isTipVisible = false this.isTipVisible = false
}, this.editNotify.code == '0' ? 1500 : 3000) }, this.editNotify.code == '0' ? 1500 : 3000)
} }
this.$apis.beforeSale.getProListApi({}).then(res => { this.$apis.ghBeforeSale.getProListApi({}).then(res => {
this.baseData.goodsStatusList = res this.baseData.goodsStatusList = res
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}) })
this.getCountNoData() this.getCountNoData()
this.$apis.beforeSale.getUserInfoApi({}).then(res => { this.$apis.ghBeforeSale.getUserInfoApi({}).then(res => {
this.userInfo = res this.userInfo = res
if(res.merchantAccountLevel != 4) { if(res.merchantAccountLevel != 4) {
var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow[this.userInfo.admin ? res.merchantAccountLevel : res.merchantAccountLevel + 1]) var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow[this.userInfo.admin ? res.merchantAccountLevel : res.merchantAccountLevel + 1])
...@@ -546,7 +546,7 @@ export default { ...@@ -546,7 +546,7 @@ export default {
methods: { methods: {
getCountNoData() { getCountNoData() {
this.$apis.beforeSale.getCountNoDataApi({}).then(res => { this.$apis.ghBeforeSale.getCountNoDataApi({}).then(res => {
this.countNoData = res this.countNoData = res
}) })
}, },
...@@ -555,7 +555,7 @@ export default { ...@@ -555,7 +555,7 @@ export default {
merchantId: merchantId, merchantId: merchantId,
accountLevel: accountLevel accountLevel: accountLevel
} }
this.$apis.beforeSale.getMerchantApi(params).then(res => { this.$apis.ghBeforeSale.getMerchantApi(params).then(res => {
this.baseData[listName] = res this.baseData[listName] = res
this.getOptionsList('searchFormData', false, attrName) this.getOptionsList('searchFormData', false, attrName)
}) })
...@@ -700,7 +700,7 @@ export default { ...@@ -700,7 +700,7 @@ export default {
return true return true
} }
this.handlePdfClose() this.handlePdfClose()
this.$apis.beforeSale.getPriteApi({ contractNo: row.contractNo }).then(res => { this.$apis.ghBeforeSale.getPriteApi({ contractNo: row.contractNo }).then(res => {
this.pdfUrl = res this.pdfUrl = res
}) })
}, },
...@@ -712,7 +712,7 @@ export default { ...@@ -712,7 +712,7 @@ export default {
attachmentFile: imgUrl, attachmentFile: imgUrl,
attachmentType: 'IMG' attachmentType: 'IMG'
} }
this.$apis.beforeSale.updateOrderApi(params).then(res => { this.$apis.ghBeforeSale.updateOrderApi(params).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
...@@ -739,7 +739,7 @@ export default { ...@@ -739,7 +739,7 @@ export default {
const imgFile = e.target.result const imgFile = e.target.result
const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1] const base64 = file.name.split('.')[1] + '@' + imgFile.split(',')[1]
var imgUrl = '' var imgUrl = ''
this.$apis.beforeSale.uploadImgApi({ file: base64, fileType: 'image' }).then(res => { this.$apis.ghBeforeSale.uploadImgApi({ file: base64, fileType: 'image' }).then(res => {
this.uploadFile(res, targetItem) this.uploadFile(res, targetItem)
}) })
} }
...@@ -760,10 +760,10 @@ export default { ...@@ -760,10 +760,10 @@ export default {
this.isFileVisible = !this.isFileVisible this.isFileVisible = !this.isFileVisible
}, },
handleUpload(row) { handleUpload(row) {
this.$apis.beforeSale.getOrderAttrApi({ packageCode: row.packageCode }).then(res => { this.$apis.ghBeforeSale.getOrderAttrApi({ packageCode: row.packageCode }).then(res => {
this.packageList = res this.packageList = res
this.uploadForm.contractNo = row.contractNo this.uploadForm.contractNo = row.contractNo
this.$apis.beforeSale.getAllOrderValueApi({ contractNo: row.contractNo }).then(subRes => { this.$apis.ghBeforeSale.getAllOrderValueApi({ contractNo: row.contractNo }).then(subRes => {
var idx = '' var idx = ''
this.packageList.forEach(item => { this.packageList.forEach(item => {
idx = subRes.findIndex(i => i.attachmentCode == item.attachmentCode) idx = subRes.findIndex(i => i.attachmentCode == item.attachmentCode)
...@@ -790,7 +790,7 @@ export default { ...@@ -790,7 +790,7 @@ export default {
// 导出 // 导出
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
this.$apis.beforeSale.getExportApi(params).then(res => { this.$apis.ghBeforeSale.getExportApi(params).then(res => {
window.open(res) window.open(res)
}) })
}, },
......
...@@ -223,7 +223,7 @@ export default { ...@@ -223,7 +223,7 @@ export default {
} }
], ],
// 表格 // 表格
getListApi: this.$apis.beforeSale.getListApi, getListApi: this.$apis.ghBeforeSale.getListApi,
tableParams: { tableParams: {
listName: 'list', listName: 'list',
tableOption: false, tableOption: false,
...@@ -473,11 +473,11 @@ export default { ...@@ -473,11 +473,11 @@ export default {
}, },
mounted() { mounted() {
this.$apis.beforeSale.getProListApi({}).then(res => { this.$apis.ghBeforeSale.getProListApi({}).then(res => {
this.baseData.goodsStatusList = res this.baseData.goodsStatusList = res
this.getOptionsList('searchFormData') this.getOptionsList('searchFormData')
}) })
this.$apis.beforeSale.getUserInfoApi({}).then(res => { this.$apis.ghBeforeSale.getUserInfoApi({}).then(res => {
this.userInfo = res this.userInfo = res
if(res.merchantAccountLevel != 4) { if(res.merchantAccountLevel != 4) {
var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow[this.userInfo.admin ? res.merchantAccountLevel : res.merchantAccountLevel + 1]) var idx = this.searchFormData.findIndex(item => item.name == this.levelToShow[this.userInfo.admin ? res.merchantAccountLevel : res.merchantAccountLevel + 1])
...@@ -493,7 +493,7 @@ export default { ...@@ -493,7 +493,7 @@ export default {
merchantId: merchantId, merchantId: merchantId,
accountLevel: accountLevel accountLevel: accountLevel
} }
this.$apis.beforeSale.getMerchantApi(params).then(res => { this.$apis.ghBeforeSale.getMerchantApi(params).then(res => {
this.baseData[listName] = res this.baseData[listName] = res
this.getOptionsList('searchFormData', false, attrName) this.getOptionsList('searchFormData', false, attrName)
}) })
...@@ -607,7 +607,7 @@ export default { ...@@ -607,7 +607,7 @@ export default {
// 导出 // 导出
handleExport() { handleExport() {
var params = this.getParams() var params = this.getParams()
this.$apis.beforeSale.getExportApi(params).then(res => { this.$apis.ghBeforeSale.getExportApi(params).then(res => {
window.open(res) window.open(res)
}) })
}, },
......
...@@ -95,13 +95,13 @@ export default { ...@@ -95,13 +95,13 @@ export default {
methods: { methods: {
getHotline() { getHotline() {
this.$apis.beforeSale.getHotlineApi({}).then(res => { this.$apis.ghBeforeSale.getHotlineApi({}).then(res => {
this.editForm.hotline = res.serviceHotline this.editForm.hotline = res.serviceHotline
this.qrcodeUrl = res.qrcodeUrl this.qrcodeUrl = res.qrcodeUrl
}) })
}, },
getDefaultCarbrand() { getDefaultCarbrand() {
this.$apis.beforeSale.getDefaultCarbrandApi({}).then(res => { this.$apis.ghBeforeSale.getDefaultCarbrandApi({}).then(res => {
// console.log(res) // console.log(res)
if (res) { if (res) {
this.editForm.id = res.id this.editForm.id = res.id
...@@ -114,7 +114,7 @@ export default { ...@@ -114,7 +114,7 @@ export default {
// 获取品牌车型 // 获取品牌车型
getAllVehicleBrand(fn = () => {}) { getAllVehicleBrand(fn = () => {}) {
const params = {} const params = {}
this.$apis.beforeSale.getCarBrandListApi(params).then(res => { this.$apis.ghBeforeSale.getCarBrandListApi(params).then(res => {
// console.log(res) // console.log(res)
this.baseData.carBrandOptions = res || [] this.baseData.carBrandOptions = res || []
}) })
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
}, },
// 获取子品牌 // 获取子品牌
getCarChildList(isRecovery = false) { getCarChildList(isRecovery = false) {
this.$apis.beforeSale.getCarChildListApi({}).then(res => { this.$apis.ghBeforeSale.getCarChildListApi({}).then(res => {
this.allCarChildList = res || [] this.allCarChildList = res || []
if (isRecovery) { if (isRecovery) {
this.baseData.carChildOptions = this.allCarChildList.find(item => item.id == this.editForm.vehicleBrandId).childs this.baseData.carChildOptions = this.allCarChildList.find(item => item.id == this.editForm.vehicleBrandId).childs
...@@ -137,7 +137,7 @@ export default { ...@@ -137,7 +137,7 @@ export default {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
var params = this.$common.utils.deepClone(this.editForm) var params = this.$common.utils.deepClone(this.editForm)
Promise.all([this.$apis.beforeSale.updateHotlineApi(params), this.$apis.beforeSale.updateCarBrandApi(params)]).then(([hotlineRes, carBrandRes]) => { Promise.all([this.$apis.ghBeforeSale.updateHotlineApi(params), this.$apis.ghBeforeSale.updateCarBrandApi(params)]).then(([hotlineRes, carBrandRes]) => {
this.$message({ this.$message({
message: hotlineRes.code == '0' && carBrandRes.code == '0' ? '操作成功' : '操作失败', message: hotlineRes.code == '0' && carBrandRes.code == '0' ? '操作成功' : '操作失败',
type: hotlineRes.code == '0' && carBrandRes.code == '0' ? 'success' : 'error' type: hotlineRes.code == '0' && carBrandRes.code == '0' ? 'success' : 'error'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!