Commit 26dab281 by cwq0219

comfirm

1 parent 7a171969
...@@ -23,6 +23,17 @@ const insertLiveRoomApi = params => { ...@@ -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 => { const getLiveRoomInfoApi = params => {
params.method = `${defaultPath}get.live.room.by.id` params.method = `${defaultPath}get.live.room.by.id`
return http({ return http({
...@@ -96,4 +107,4 @@ const updateReplayApi = params => { ...@@ -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,13 +181,16 @@ export default { ...@@ -181,13 +181,16 @@ export default {
}) })
}, },
handleProDelete() { handleProDelete() {
this.$messageBox.alert('是否删除该商品?', '删除', { this.$messageBox.confirm('是否删除该商品?', '删除', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error', type: 'error',
callback: action => { callback: action => {
if (action == 'confirm') {
this.selectedProInfo = {} this.selectedProInfo = {}
this.selectedProInfoList = [] this.selectedProInfoList = []
} }
}
}) })
}, },
handleSinglePro(targetItem) { handleSinglePro(targetItem) {
......
...@@ -174,13 +174,16 @@ export default { ...@@ -174,13 +174,16 @@ export default {
this.isMutiSelectVisible = !this.isMutiSelectVisible this.isMutiSelectVisible = !this.isMutiSelectVisible
}, },
handleProDelete(obj) { handleProDelete(obj) {
this.$messageBox.alert('是否删除该商品?', '删除', { this.$messageBox.confirm('是否删除该商品?', '删除', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error', type: 'error',
callback: action => { callback: action => {
if (action == 'confirm') {
var idx = this.editForm.shopMallGoodsInfoList.findIndex(item => item.id == obj.id) var idx = this.editForm.shopMallGoodsInfoList.findIndex(item => item.id == obj.id)
this.editForm.shopMallGoodsInfoList.splice(idx, 1) this.editForm.shopMallGoodsInfoList.splice(idx, 1)
} }
}
}) })
}, },
handleMutiSelectConfirm(selectedProInfo) { handleMutiSelectConfirm(selectedProInfo) {
......
...@@ -128,13 +128,15 @@ export default { ...@@ -128,13 +128,15 @@ export default {
}) })
}, },
handleExamine(row) { handleExamine(row) {
this.$messageBox.alert('审核大概需要1-7天', '提交审核', { this.$messageBox.confirm('审核大概需要1-7天', '提交审核', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning', type: 'warning',
callback: action => { callback: action => {
if (action == 'confirm') {
auditGoodApi({ id: row.id }).then(res => { auditGoodApi({ id: row.id }).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : '操作失败', message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
if (res.code == '0') { if (res.code == '0') {
...@@ -142,16 +144,19 @@ export default { ...@@ -142,16 +144,19 @@ export default {
} }
}) })
} }
}
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$messageBox.alert('是否删除该商品?', '删除', { this.$messageBox.confirm('是否删除该商品?', '删除', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error', type: 'error',
callback: action => { callback: action => {
if (action == 'confirm') {
deleteGoodApi({ id: row.id }).then(res => { deleteGoodApi({ id: row.id }).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : '操作失败', message: res.code == '0' ? '操作成功' : res.message,
type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
}) })
if (res.code == '0') { if (res.code == '0') {
...@@ -159,6 +164,7 @@ export default { ...@@ -159,6 +164,7 @@ export default {
} }
}) })
} }
}
}) })
}, },
handleReset() { handleReset() {
......
...@@ -127,19 +127,22 @@ export default { ...@@ -127,19 +127,22 @@ export default {
}, },
handleDelete(row) { handleDelete(row) {
this.$messageBox.alert('是否删除该商品?', '删除', { this.$messageBox.confirm('是否删除该商品?', '删除', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error', type: 'error',
callback: action => { callback: action => {
// deleteGoodApi({ id: row.id }).then(res => { if (action == 'confirm') {
// this.$message({ deleteGoodApi({ id: row.id }).then(res => {
// message: res.code == '0' ? '操作成功' : '操作失败', this.$message({
// type: res.code == '0' ? 'success' : 'error' message: res.code == '0' ? '操作成功' : res.message,
// }) type: res.code == '0' ? 'success' : 'error'
// if (res.code == '0') { })
// this.handleSearch() if (res.code == '0') {
// } this.handleSearch()
// }) }
})
}
} }
}) })
}, },
......
...@@ -315,13 +315,16 @@ export default { ...@@ -315,13 +315,16 @@ export default {
// this.$refs.couponAddForm.clearValidate('merchantCouponDTOList') // this.$refs.couponAddForm.clearValidate('merchantCouponDTOList')
}, },
handleProDelete(obj) { handleProDelete(obj) {
this.$messageBox.alert('是否删除该门店?', '删除', { this.$messageBox.confirm('是否删除该门店?', '删除', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error', type: 'error',
callback: action => { callback: action => {
if (action == 'confirm') {
var idx = this.storeSelectedList.findIndex(item => item.merchantNo == obj.scope.merchantNo) var idx = this.storeSelectedList.findIndex(item => item.merchantNo == obj.scope.merchantNo)
this.storeSelectedList.splice(idx, 1) this.storeSelectedList.splice(idx, 1)
} }
}
}) })
}, },
dateFormate(date) { dateFormate(date) {
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<script> <script>
import glsxDialog from '@/components/glsx-dialog' import glsxDialog from '@/components/glsx-dialog'
// import glsxTable from '@/components/glsx-table' // import glsxTable from '@/components/glsx-table'
import { getLiveRoomListApi } from '@/api/modules/liveRoom' import { getLiveRoomListApi, deleteLiveRoomApi } from '@/api/modules/liveRoom'
import { liveStatusList } from '@/common/constant' import { liveStatusList } from '@/common/constant'
export default { export default {
name: 'liveRoom', name: 'liveRoom',
...@@ -163,14 +163,22 @@ export default { ...@@ -163,14 +163,22 @@ export default {
}) })
}, },
handleDelete(row) { handleDelete(row) {
this.$messageBox.alert('是否删除该直播间?', '删除', { this.$messageBox.confirm('是否删除该直播间?', '删除', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'error', type: 'error',
callback: action => { callback: action => {
if (action == 'confirm') {
deleteLiveRoomApi({ id: row.id }).then(res => {
this.$message({ this.$message({
type: 'success', message: res.code == '0' ? '操作成功' : res.message,
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!