Commit 203f866b by cwq0219

编辑

1 parent 298ed036
...@@ -86,6 +86,16 @@ const getPackageListApi = params => { ...@@ -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 => { const updateEquityApi = params => {
params.method = `${orderPath}insert.or.update` params.method = `${orderPath}insert.or.update`
return http({ return http({
...@@ -108,4 +118,4 @@ const createCodeApi = params => { ...@@ -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([{ ...@@ -27,7 +27,7 @@ const staticRoutes = Object.freeze([{
}, },
{ {
name: 'editEquity', name: 'editEquity',
path: '/beforeSale/editEquity/:addOrEdit/:id', path: '/beforeSale/editEquity/:addOrEdit/:contractNo',
component: resolve => require([`@/views/beforeSale/editEquity.vue`], resolve), component: resolve => require([`@/views/beforeSale/editEquity.vue`], resolve),
meta: {} meta: {}
} ]) } ])
......
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
routeInfo: { routeInfo: {
// 1-新增;2-编辑;3-查看 // 1-新增;2-编辑;3-查看
addOrEdit: 1, addOrEdit: 1,
id: '' contractNo: ''
}, },
editForm: { editForm: {
packageCode: '', packageCode: '',
...@@ -395,14 +395,15 @@ export default { ...@@ -395,14 +395,15 @@ export default {
methods: { methods: {
getInfo() { getInfo() {
// this.$apis.zoneList.getZoneInfoApi({ id: this.routeInfo.id }).then(res => { this.$apis.beforeSale.getEquityApi({ contractNo: this.routeInfo.contractNo }).then(res => {
// this.editForm.zoneName = res.zoneName console.log(res)
// this.editForm.zoneImg = res.zoneImg // this.editForm.zoneName = res.zoneName
// this.editForm.merchantList = res.merchantRefList // this.editForm.zoneImg = res.zoneImg
// this.editForm.merchantList.forEach(item => { // this.editForm.merchantList = res.merchantRefList
// item.merchantNo = item.merchantId // this.editForm.merchantList.forEach(item => {
// }) // item.merchantNo = item.merchantId
// }) // })
})
}, },
getPackageList() { getPackageList() {
this.$apis.beforeSale.getPackageListApi({}).then(res => { this.$apis.beforeSale.getPackageListApi({}).then(res => {
...@@ -590,7 +591,7 @@ export default { ...@@ -590,7 +591,7 @@ export default {
var params = this.getParams() var params = this.getParams()
params.operationType = 0 params.operationType = 0
if (this.routeInfo.addOrEdit == 2) { if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id params.contractNo = this.routeInfo.contractNo
this.updateEquity(params) this.updateEquity(params)
} else { } else {
this.$apis.beforeSale.createCodeApi({}).then(res => { this.$apis.beforeSale.createCodeApi({}).then(res => {
...@@ -626,7 +627,7 @@ export default { ...@@ -626,7 +627,7 @@ export default {
if (valid) { if (valid) {
var params = this.$common.utils.deepClone(this.editForm) var params = this.$common.utils.deepClone(this.editForm)
if (this.routeInfo.addOrEdit == 2) { if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id params.contractNo = this.routeInfo.contractNo
} }
// this.$apis.zoneList.insertZoneApi(params).then(res => { // this.$apis.zoneList.insertZoneApi(params).then(res => {
// this.$message({ // this.$message({
......
...@@ -305,11 +305,11 @@ export default { ...@@ -305,11 +305,11 @@ export default {
}, },
// 1-新增;2-编辑 // 1-新增;2-编辑
handleEdit(addOrEdit, row) { 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) { 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!