Commit 26dab281 by cwq0219

comfirm

1 parent 7a171969
......@@ -23,6 +23,17 @@ const insertLiveRoomApi = params => {
})
}
const deleteLiveRoomApi = params => {
params.method = `${defaultPath}delete.live.room`
return http({
url: 'rop-scrm-live/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const getLiveRoomInfoApi = params => {
params.method = `${defaultPath}get.live.room.by.id`
return http({
......@@ -96,4 +107,4 @@ const updateReplayApi = params => {
})
}
export { getLiveRoomListApi, insertLiveRoomApi, getLiveRoomInfoApi, getControlInfoApi, getControlImportListApi, getWaitImportListApi, importGoodsApi, updateCommentApi, updateReplayApi }
export { getLiveRoomListApi, insertLiveRoomApi, deleteLiveRoomApi, getLiveRoomInfoApi, getControlInfoApi, getControlImportListApi, getWaitImportListApi, importGoodsApi, updateCommentApi, updateReplayApi }
......@@ -181,12 +181,15 @@ export default {
})
},
handleProDelete() {
this.$messageBox.alert('是否删除该商品?', '删除', {
this.$messageBox.confirm('是否删除该商品?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
callback: action => {
this.selectedProInfo = {}
this.selectedProInfoList = []
if (action == 'confirm') {
this.selectedProInfo = {}
this.selectedProInfoList = []
}
}
})
},
......
......@@ -174,12 +174,15 @@ export default {
this.isMutiSelectVisible = !this.isMutiSelectVisible
},
handleProDelete(obj) {
this.$messageBox.alert('是否删除该商品?', '删除', {
this.$messageBox.confirm('是否删除该商品?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
callback: action => {
var idx = this.editForm.shopMallGoodsInfoList.findIndex(item => item.id == obj.id)
this.editForm.shopMallGoodsInfoList.splice(idx, 1)
if (action == 'confirm') {
var idx = this.editForm.shopMallGoodsInfoList.findIndex(item => item.id == obj.id)
this.editForm.shopMallGoodsInfoList.splice(idx, 1)
}
}
})
},
......
......@@ -128,36 +128,42 @@ export default {
})
},
handleExamine(row) {
this.$messageBox.alert('审核大概需要1-7天', '提交审核', {
this.$messageBox.confirm('审核大概需要1-7天', '提交审核', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
callback: action => {
auditGoodApi({ id: row.id }).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
if (action == 'confirm') {
auditGoodApi({ id: row.id }).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleSearch()
}
})
if (res.code == '0') {
this.handleSearch()
}
})
}
}
})
},
handleDelete(row) {
this.$messageBox.alert('是否删除该商品?', '删除', {
this.$messageBox.confirm('是否删除该商品?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
callback: action => {
deleteGoodApi({ id: row.id }).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : '操作失败',
type: res.code == '0' ? 'success' : 'error'
if (action == 'confirm') {
deleteGoodApi({ id: row.id }).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleSearch()
}
})
if (res.code == '0') {
this.handleSearch()
}
})
}
}
})
},
......
......@@ -127,19 +127,22 @@ export default {
},
handleDelete(row) {
this.$messageBox.alert('是否删除该商品?', '删除', {
this.$messageBox.confirm('是否删除该商品?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
callback: action => {
// deleteGoodApi({ id: row.id }).then(res => {
// this.$message({
// message: res.code == '0' ? '操作成功' : '操作失败',
// type: res.code == '0' ? 'success' : 'error'
// })
// if (res.code == '0') {
// this.handleSearch()
// }
// })
if (action == 'confirm') {
deleteGoodApi({ id: row.id }).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleSearch()
}
})
}
}
})
},
......
......@@ -315,12 +315,15 @@ export default {
// this.$refs.couponAddForm.clearValidate('merchantCouponDTOList')
},
handleProDelete(obj) {
this.$messageBox.alert('是否删除该门店?', '删除', {
this.$messageBox.confirm('是否删除该门店?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
callback: action => {
var idx = this.storeSelectedList.findIndex(item => item.merchantNo == obj.scope.merchantNo)
this.storeSelectedList.splice(idx, 1)
if (action == 'confirm') {
var idx = this.storeSelectedList.findIndex(item => item.merchantNo == obj.scope.merchantNo)
this.storeSelectedList.splice(idx, 1)
}
}
})
},
......
......@@ -66,7 +66,7 @@
<script>
import glsxDialog from '@/components/glsx-dialog'
// import glsxTable from '@/components/glsx-table'
import { getLiveRoomListApi } from '@/api/modules/liveRoom'
import { getLiveRoomListApi, deleteLiveRoomApi } from '@/api/modules/liveRoom'
import { liveStatusList } from '@/common/constant'
export default {
name: 'liveRoom',
......@@ -163,14 +163,22 @@ export default {
})
},
handleDelete(row) {
this.$messageBox.alert('是否删除该直播间?', '删除', {
this.$messageBox.confirm('是否删除该直播间?', '删除', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error',
callback: action => {
this.$message({
type: 'success',
message: '操作成功'
})
if (action == 'confirm') {
deleteLiveRoomApi({ id: row.id }).then(res => {
this.$message({
message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error'
})
if (res.code == '0') {
this.handleSearch()
}
})
}
}
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!