Commit d4998274 by wuwx Committed by 杨北旺

sop编辑

1 parent 78549284
......@@ -102,8 +102,20 @@ const endSopEventApi = params => {
}
// 事件进行中,修改sop事件列表
const insertOrUpdateSopEventApi = params => {
params.method = 'scrm.api.sop.sopEvent.insertOrUpdate'
// const insertOrUpdateSopEventApi = params => {
// params.method = 'scrm.api.sop.sopEvent.insertOrUpdate'
// return http({
// url: 'rop-scrm-sop/router',
// method: 'POST',
// data: params,
// sign: true,
// returnAll: true
// })
// }
// 事件进行中,批量编辑sop
const batchEditSopEventApi = params => {
params.method = 'scrm.api.sop.sopEvent.batchEdit'
return http({
url: 'rop-scrm-sop/router',
method: 'POST',
......@@ -135,4 +147,4 @@ const getSopInfoDetailApi = params => {
})
}
export default { getCustomerByTagListApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, insertOrUpdateSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi }
export default { getCustomerByTagListApi, getSopInfoListApi, getSopBaseInfoApi, getEventListApi, getSopCustomerStatisticsListApi, getSopStaffTaskListApi, parseEventCountApi, deleteSopEventApi, endSopEventApi, batchEditSopEventApi, insertOrUpdateSopApi, getSopInfoDetailApi }
......@@ -83,6 +83,7 @@ export default {
editChildRef: 'editChildRef',
editStatus: false,
editDisabled: false,
deleteIdList: [],
labelWidth: '144px',
condLimitObj: {
// 1-有;0-无
......@@ -262,6 +263,8 @@ export default {
type: 'warning',
callback: action => {
if (action == 'confirm') {
let obj = this.editForm.eventList[idx]
obj.id && this.deleteIdList.push(obj.id)
this.editForm.eventList.splice(idx, 1)
}
}
......@@ -326,8 +329,13 @@ export default {
console.log(params)
// var apiName = this.editDisabled ? 'insertOrUpdateSopEventApi' : 'insertOrUpdateSopApi'
if (this.editDisabled) {
// 事件进行时
this.$apis.sop.insertOrUpdateSopEventApi(params).then(res => {
var batchEditParams = {
sopId: params.id,
deleteIdList: this.deleteIdList,
editList: params.eventList
}
// 事件进行时,批量编辑sop事件
this.$apis.sop.batchEditSopEventApi(batchEditParams).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
......@@ -337,7 +345,7 @@ export default {
}
})
} else {
// 新增/事件未开始,调这里
// 新增事件或者事件未开始,调这里
this.$apis.sop.insertOrUpdateSopApi(params).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!