Commit b074f09d by wangzhihui

优化

1 parent 810c1ad2
......@@ -47,7 +47,7 @@ export function getEvalOrderPriceHistory(data) {
}
//评估车辆
export function evaluateCar(data) {
return gscPost("/evalOrderManage/evaluate", data, true)
return gscPost("/evalOrderManage/evaluate", data, { returnAll: true })
}
//车辆评估导出
export function exportEvaluate(data) {
......@@ -60,11 +60,11 @@ export function getSunlightPage(data) {
}
//修改阳光激励配置
export const updateSunlightConfig = (data) => {
return gscPost("/sunlightInspiresConfig/edit", data)
return gscPost("/sunlightInspiresConfig/edit", data, { returnAll: true })
}
// 新增阳光激励配置
export const createSunlightConfig = (data) => {
return gscPost("/sunlightInspiresConfig/create", data)
return gscPost("/sunlightInspiresConfig/create", data, { returnAll: true })
}
//阳光激励详情
export const getSunlightConfig = (data) => {
......
......@@ -66,7 +66,6 @@ export default {
},
methods: {
handleReject() {
console.log("paramsObj", this.paramsObj)
this.rejectVisible = !this.rejectVisible
},
dialogClose() {
......@@ -101,11 +100,23 @@ export default {
}).then(() => {
evaluateCar(params).then((res) => {
console.log(res)
// this.$message.success("操作成功")
// this.handleCancel()
// this.rejectVisible = false
if (res.data.code == 0) {
this.$message.success("操作成功")
this.handleCancel()
this.rejectVisible = false
} else if (res.data.code == 1000) {
this.refreshPage()
} else {
this.$message.error(res.data.msg)
}
})
})
},
refreshPage() {
// 方式一:重新加载当前路由
this.$router.go(0)
this.getEvalOrderDetail()
this.getEvalOrderPriceHistory()
}
}
}
......
......@@ -196,9 +196,7 @@
subitem.formatter
? subitem.formatter(detailInfo, signIndex) ||
"-"
: detailInfo.electronicContractField[
signIndex == 1 ? subitem.keyA : subitem.keyB
]
: detailInfo.electronicContractField
? detailInfo.electronicContractField[
signIndex == 1 ? subitem.keyA : subitem.keyB
]
......@@ -489,7 +487,7 @@ export default {
this.getContractDetail()
},
mounted() {
this.trackBusinessParam = { id }
this.trackBusinessParam = { id: this.id }
this.onPageShow()
},
methods: {
......@@ -529,6 +527,7 @@ export default {
description: this.detailInfo.description
}
getContractEdit(params).then((res) => {
console.log(res)
this.handleCancel()
this.$message.success("操作成功")
})
......
......@@ -227,9 +227,12 @@ export default {
? updateSunlightConfig
: createSunlightConfig
Methods(params).then((res) => {
console.log(res)
this.notice.okTips("操作成功")
this.visible = true
if (res.data.code == 0) {
this.$message.success("操作成功")
this.visible = true
} else {
this.$message.error(res.data.msg)
}
})
}
})
......
......@@ -220,6 +220,7 @@ export default {
mounted() {
this.onPageShow()
this.getServiceStore()
this.getOptionsList("showFormData", true, "carType")
},
computed: {
...mapState({
......@@ -232,45 +233,6 @@ export default {
methods: {
...mapActions("d2admin/user", ["actionSetDownloadList"]),
setReportTrackData(
eventType,
eventCode = "",
businessParam = "",
batchId = ""
) {
let recordList = localStorage.getItem("recordList")
const route = this.$route
const { loginAccout, uuid, userType } = this.loginAccount
let { prePagePath } = this
const item = {
loginAccount: loginAccout,
uuid,
userType,
systemSource: 1,
eventTime: Util.dateFormate(Date.now(), "YYYY-MM-DD HH:mm:ss"),
eventType,
pagePath: route.path
}
if (!prePagePath) prePagePath = this.getPrePagePath(this)
item.prePagePath = prePagePath || "/index"
if (batchId) item.batchId = batchId
if (eventCode) item.eventCode = eventCode
if (businessParam) item.businessParam = JSON.stringify(businessParam)
if (!recordList) recordList = [item]
else {
recordList = JSON.parse(recordList)
recordList.push(item)
}
localStorage.setItem("recordList", JSON.stringify(recordList))
if (recordList.length > 9) {
reportTrack({
recordList
}).then((res) => {
if (res) localStorage.removeItem("recordList")
})
}
},
handleAddStimulate() {
this.paramsObj = {}
this.sunVisible = true
......@@ -318,7 +280,7 @@ export default {
scene: 7 //二手车
}).then((res) => {
this.baseData.storeIdList = res || []
this.getOptionsList()
this.getOptionsList("showFormData", false, "sellerMerchantIds")
})
},
//车辆评估
......@@ -410,29 +372,53 @@ export default {
}
},
getOptionsList() {
this.showFormData.forEach((item, index) => {
if (item.type === "select") {
getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) {
var item = this[formName].find((k) => k.name == refreshSigle)
var index = this[formName].findIndex((k) => k.name == refreshSigle)
this.$set(
this[formName][index],
"optionList",
deepClone(this.baseData[item.optionsName])
)
if (
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this[formName][index].optionId] = ""
temp[this[formName][index].optionLabel] = "全部"
this[formName][index].optionList.unshift(temp)
}
} else {
this[formName].forEach((item, index) => {
if (
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this.showFormData[index].optionLabel
] !== "全部"
["select", "radio"].includes(item.type) &&
this.baseData[item.optionsName].length
) {
// if (item.optionsName != "brandList") {
const temp = {}
temp[this.showFormData[index].optionId] = ""
temp[this.showFormData[index].optionLabel] = "全部"
this.baseData[item.optionsName].unshift(temp)
// }
this.$set(
this[formName][index],
"optionList",
deepClone(this.baseData[item.optionsName])
)
if (
hasAll &&
this.baseData[item.optionsName].length &&
this.baseData[item.optionsName][0][
this[formName][index].optionLabel
] !== "全部"
) {
const temp = {}
temp[this[formName][index].optionId] = ""
temp[this[formName][index].optionLabel] = "全部"
this[formName][index].optionList.unshift(temp)
}
}
this.$set(
this.showFormData[index],
"optionList",
this.baseData[item.optionsName]
)
}
})
})
}
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!