Commit 203f866b by cwq0219

编辑

1 parent 298ed036
......@@ -86,6 +86,16 @@ const getPackageListApi = params => {
})
}
const getEquityApi = params => {
params.method = `${orderPath}detail`
return http({
url: 'rop-scrm-equity/router',
method: 'POST',
data: params,
sign: true
})
}
const updateEquityApi = params => {
params.method = `${orderPath}insert.or.update`
return http({
......@@ -108,4 +118,4 @@ const createCodeApi = params => {
})
}
export default { getListApi, getExportApi, getCarBrandListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, updateHotlineApi, getPackageListApi, updateEquityApi, createCodeApi }
export default { getListApi, getExportApi, getCarBrandListApi, getCarTypeListApi, getCarSeriesListApi, getHotlineApi, updateHotlineApi, getPackageListApi, getEquityApi, updateEquityApi, createCodeApi }
......@@ -27,7 +27,7 @@ const staticRoutes = Object.freeze([{
},
{
name: 'editEquity',
path: '/beforeSale/editEquity/:addOrEdit/:id',
path: '/beforeSale/editEquity/:addOrEdit/:contractNo',
component: resolve => require([`@/views/beforeSale/editEquity.vue`], resolve),
meta: {}
} ])
......
......@@ -90,7 +90,7 @@ export default {
routeInfo: {
// 1-新增;2-编辑;3-查看
addOrEdit: 1,
id: ''
contractNo: ''
},
editForm: {
packageCode: '',
......@@ -395,14 +395,15 @@ export default {
methods: {
getInfo() {
// this.$apis.zoneList.getZoneInfoApi({ id: this.routeInfo.id }).then(res => {
// this.editForm.zoneName = res.zoneName
// this.editForm.zoneImg = res.zoneImg
// this.editForm.merchantList = res.merchantRefList
// this.editForm.merchantList.forEach(item => {
// item.merchantNo = item.merchantId
// })
// })
this.$apis.beforeSale.getEquityApi({ contractNo: this.routeInfo.contractNo }).then(res => {
console.log(res)
// this.editForm.zoneName = res.zoneName
// this.editForm.zoneImg = res.zoneImg
// this.editForm.merchantList = res.merchantRefList
// this.editForm.merchantList.forEach(item => {
// item.merchantNo = item.merchantId
// })
})
},
getPackageList() {
this.$apis.beforeSale.getPackageListApi({}).then(res => {
......@@ -590,7 +591,7 @@ export default {
var params = this.getParams()
params.operationType = 0
if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id
params.contractNo = this.routeInfo.contractNo
this.updateEquity(params)
} else {
this.$apis.beforeSale.createCodeApi({}).then(res => {
......@@ -626,7 +627,7 @@ export default {
if (valid) {
var params = this.$common.utils.deepClone(this.editForm)
if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id
params.contractNo = this.routeInfo.contractNo
}
// this.$apis.zoneList.insertZoneApi(params).then(res => {
// this.$message({
......
......@@ -305,11 +305,11 @@ export default {
},
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + addOrEdit + '/' + -1) : this.$router.push('/beforeSale/editEquity/' + addOrEdit + '/' + row.id)
addOrEdit == 1 ? this.$router.push('/beforeSale/editEquity/' + addOrEdit + '/' + -1) : this.$router.push('/beforeSale/editEquity/' + addOrEdit + '/' + row.contractNo)
},
handleDelete(row) {
this.secondConfirm('删除', '是否确认删除该专区?', 'zoneList', 'deleteZoneApi', { id: row.id })
this.secondConfirm('删除', '是否确认删除该专区?', 'zoneList', 'deleteZoneApi', { contractNo: row.contractNo })
},
// 导出
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!