Commit 641d7297 by 杨北旺

更换接口入口

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