Commit 80dd7a61 by cwq0219

分类,晒单

1 parent fc21c280
...@@ -22,4 +22,37 @@ const getClassifyInfoApi = params => { ...@@ -22,4 +22,37 @@ const getClassifyInfoApi = params => {
}) })
} }
export default { getListApi, getClassifyInfoApi } const insertClassifyApi = params => {
params.method = `${defaultPath}classify.insertOrUpdate`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const deleteClassifyApi = params => {
params.method = `${defaultPath}classify.delete`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const topClassifyApi = params => {
params.method = `${defaultPath}classify.updateToTop`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getListApi, getClassifyInfoApi, insertClassifyApi, deleteClassifyApi, topClassifyApi }
...@@ -12,4 +12,26 @@ const getListApi = params => { ...@@ -12,4 +12,26 @@ const getListApi = params => {
}) })
} }
export default { getListApi } const deleteShareRecordApi = params => {
params.method = `${defaultPath}orderShareRecord.remove`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
const revokeShareRecordApi = params => {
params.method = `${defaultPath}orderShareRecord.revoke`
return http({
url: 'rop-scrm-shopmall/router',
method: 'POST',
data: params,
sign: true,
returnAll: true
})
}
export default { getListApi, deleteShareRecordApi, revokeShareRecordApi }
...@@ -16,7 +16,7 @@ const deleteZoneApi = params => { ...@@ -16,7 +16,7 @@ const deleteZoneApi = params => {
params.method = `${defaultPath}zoneInfo.delete` params.method = `${defaultPath}zoneInfo.delete`
return http({ return http({
url: 'rop-scrm-shopmall/router', url: 'rop-scrm-shopmall/router',
method: 'GET', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll: true returnAll: true
...@@ -37,7 +37,7 @@ const insertZoneApi = params => { ...@@ -37,7 +37,7 @@ const insertZoneApi = params => {
params.method = `${defaultPath}zoneInfo.insertOrUpdate` params.method = `${defaultPath}zoneInfo.insertOrUpdate`
return http({ return http({
url: 'rop-scrm-shopmall/router', url: 'rop-scrm-shopmall/router',
method: 'GET', method: 'POST',
data: params, data: params,
sign: true, sign: true,
returnAll: true returnAll: true
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
.marketing .footer-btns { .marketing .footer-btns {
float: right; float: right;
margin-bottom: 18px;
} }
.el-scrollbar__bar.is-horizontal{ .el-scrollbar__bar.is-horizontal{
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</template> </template>
<span slot="auth-button" slot-scope="scope"> <span slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleProDelete(scope)">删除</el-button> <el-button type="text" @click="handleProDelete(scope)">删除</el-button>
<el-button type="text" @click="handleProDelete(scope)">置顶</el-button> <el-button type="text" @click="handleProTop(scope)">置顶</el-button>
</span> </span>
</GLTable> </GLTable>
</div> </div>
...@@ -162,6 +162,11 @@ export default { ...@@ -162,6 +162,11 @@ export default {
} }
}) })
}, },
handleProTop(obj) {
var idx = this.editForm.goodsRefList.findIndex(item => item.id == obj.scope.id)
this.editForm.goodsRefList.splice(idx, 1)
this.editForm.goodsRefList.unshift(obj.scope)
},
handleConfirm() { handleConfirm() {
this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => { this.$refs.editFormRef.$refs[this.editChildRef].validate(valid => {
if (valid) { if (valid) {
...@@ -172,15 +177,15 @@ export default { ...@@ -172,15 +177,15 @@ export default {
if (this.routeInfo.addOrEdit == 2) { if (this.routeInfo.addOrEdit == 2) {
params.id = this.routeInfo.id params.id = this.routeInfo.id
} }
// this.$apis.zoneList.insertZoneApi(params).then(res => { this.$apis.classifyList.insertClassifyApi(params).then(res => {
// this.$message({ this.$message({
// message: res.code == '0' ? '操作成功' : '操作失败', message: res.code == '0' ? '操作成功' : '操作失败',
// type: res.code == '0' ? 'success' : 'error' type: res.code == '0' ? 'success' : 'error'
// }) })
// if (res.code == '0') { if (res.code == '0') {
// this.handleCancel() this.handleCancel()
// } }
// }) })
} }
}) })
}, },
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button> <el-button type="text" @click="handleEdit(2, scope.scope)">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">置顶</el-button> <el-button type="text" @click="handleTop(scope.scope)">置顶</el-button>
</div> </div>
</GLTable> </GLTable>
<!-- 表格区域 end --> <!-- 表格区域 end -->
...@@ -96,31 +96,40 @@ export default { ...@@ -96,31 +96,40 @@ export default {
resolve() resolve()
}) })
}, },
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
addOrEdit == 1 ? this.$router.push('/classifyList/editClassify/' + addOrEdit) : this.$router.push('/classifyList/editClassify/' + addOrEdit + '/' + row.id)
},
handleDelete(row) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm('是否确认删除该专区?', '删除', { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
callback: action => { callback: action => {
if (action == 'confirm') { if (action == 'confirm') {
// this.$apis.zoneList.deleteZoneApi({ id: row.id }).then(res => { this.$apis[apiModule][apiName](apiParams).then(res => {
// this.$message({ this.$message({
// message: res.code == '0' ? '操作成功' : res.message, 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') {
// this.handleSearch() fn && fn()
// } this.handleSearch()
// }) }
})
} }
} }
}) })
}, },
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
addOrEdit == 1 ? this.$router.push('/classifyList/editClassify/' + addOrEdit) : this.$router.push('/classifyList/editClassify/' + addOrEdit + '/' + row.id)
},
handleDelete(row) {
this.secondConfirm('删除', '此功能只删除小程序对应分类区,不会删除分类下的商品,确定删除此分类?', 'classifyList', 'deleteClassifyApi', { id: row.id })
},
handleTop(row) {
this.secondConfirm('置顶', '确定置顶此分类?', 'classifyList', 'topClassifyApi', { id: row.id })
},
handleSearch() { handleSearch() {
this.$refs.classifyRef.refreshTable() this.$refs.classifyRef.refreshTable()
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<GLTable ref="shareRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="shareRef" :getListApi="getListApi" :searchForm="tableSearchForm" :tableParams="tableParams" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<div class="table-btns" slot="auth-button" slot-scope="scope"> <div class="table-btns" slot="auth-button" slot-scope="scope">
<el-button type="text" @click="handleEdit(2, scope.scope)">发布</el-button> <el-button v-if="scope.scope.shareStatus == 0" type="text" @click="handleEdit(2, scope.scope)">发布</el-button>
<el-button type="text" @click="handleEdit(2, scope.scope)">撤回</el-button> <el-button v-if="scope.scope.shareStatus == 1" type="text" @click="handleRevoke(scope.scope)">撤回</el-button>
<el-button type="text" @click="handleDelete(scope.scope)">删除</el-button> <el-button type="text" @click="handleDelete(scope.scope)">删除</el-button>
</div> </div>
</GLTable> </GLTable>
...@@ -139,31 +139,40 @@ export default { ...@@ -139,31 +139,40 @@ export default {
resolve() resolve()
}) })
}, },
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
addOrEdit == 1 ? this.$router.push('/orderShare/editShare/' + addOrEdit) : this.$router.push('/orderShare/editShare/' + addOrEdit + '/' + row.id)
},
handleDelete(row) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm('是否确认删除该专区?', '删除', { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
callback: action => { callback: action => {
if (action == 'confirm') { if (action == 'confirm') {
// this.$apis.zoneList.deleteZoneApi({ id: row.id }).then(res => { this.$apis[apiModule][apiName](apiParams).then(res => {
// this.$message({ this.$message({
// message: res.code == '0' ? '操作成功' : res.message, 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') {
// this.handleSearch() fn && fn()
// } this.handleSearch()
// }) }
})
} }
} }
}) })
}, },
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
addOrEdit == 1 ? this.$router.push('/orderShare/editShare/' + addOrEdit) : this.$router.push('/orderShare/editShare/' + addOrEdit + '/' + row.id)
},
// 撤回
handleRevoke(row) {
this.secondConfirm('撤回', '是否确认撤回该晒单?', 'orderShare', 'revokeShareRecordApi', { id: row.id })
},
handleDelete(row) {
this.secondConfirm('删除', '是否确认删除该晒单?', 'orderShare', 'deleteShareRecordApi', { id: row.id })
},
getOptionsList(formName, hasAll = true, refreshSigle) { getOptionsList(formName, hasAll = true, refreshSigle) {
if (refreshSigle) { if (refreshSigle) {
......
...@@ -108,24 +108,21 @@ export default { ...@@ -108,24 +108,21 @@ export default {
resolve() resolve()
}) })
}, },
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
},
handleDelete(row) { secondConfirm(title, txt, apiModule, apiName, apiParams, fn) {
this.$confirm('是否确认删除该专区?', '删除', { this.$confirm(txt, title, {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
callback: action => { callback: action => {
if (action == 'confirm') { if (action == 'confirm') {
this.$apis.zoneList.deleteZoneApi({ id: row.id }).then(res => { this.$apis[apiModule][apiName](apiParams).then(res => {
this.$message({ this.$message({
message: res.code == '0' ? '操作成功' : res.message, 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') {
fn && fn()
this.handleSearch() this.handleSearch()
} }
}) })
...@@ -133,6 +130,14 @@ export default { ...@@ -133,6 +130,14 @@ export default {
} }
}) })
}, },
// 1-新增;2-编辑
handleEdit(addOrEdit, row) {
addOrEdit == 1 ? this.$router.push('/zoneList/editZone/' + addOrEdit) : this.$router.push('/zoneList/editZone/' + addOrEdit + '/' + row.id)
},
handleDelete(row) {
this.secondConfirm('删除', '是否确认删除该专区?', 'zoneList', 'deleteZoneApi', { id: row.id })
},
handleSearch() { handleSearch() {
this.$refs.zoneRef.refreshTable() this.$refs.zoneRef.refreshTable()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!