提交
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package io.v.nutz.jf.controller.activitybx;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.wizzer.framework.base.Result;
|
||||
import io.v.nutz.annontation.ViReturn;
|
||||
import io.v.nutz.base.utils.DateUtil;
|
||||
import io.v.nutz.base.utils.Vi;
|
||||
@@ -10,6 +12,7 @@ import io.v.nutz.sys.models.Sys_signature;
|
||||
import io.v.nutz.sys.services.SysSignatureService;
|
||||
import io.v.nutz.web.commons.utils.ShiroUtil;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.nutz.dao.Chain;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Sqls;
|
||||
import org.nutz.dao.sql.Sql;
|
||||
@@ -17,7 +20,6 @@ import org.nutz.ioc.loader.annotation.Inject;
|
||||
import org.nutz.ioc.loader.annotation.IocBean;
|
||||
import org.nutz.json.Json;
|
||||
import org.nutz.lang.Strings;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
import org.nutz.mvc.annotation.At;
|
||||
import org.nutz.mvc.annotation.Ok;
|
||||
|
||||
@@ -119,5 +121,17 @@ public class AccountingCon {
|
||||
return activityBxService.dao().query(Goods.class, Cnd.where("reid", "=", id));
|
||||
}
|
||||
|
||||
@At
|
||||
public Object doRevoke(String id) {
|
||||
if (StrUtil.isBlank(id)) {
|
||||
return Result.error("参数错误");
|
||||
}
|
||||
activityBxService.update(Chain.make("state_id", 1020)
|
||||
.add("accounting", null)
|
||||
.add("accounting_name", null),
|
||||
Cnd.where("id", "=", id));
|
||||
return Result.success("撤回成功");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -122,6 +122,10 @@ layout("/layouts/platform.html"){
|
||||
v-if="[1020].includes(row.state_id)">
|
||||
审核
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="{type:'revoke',data:row}"
|
||||
v-if="[1030].includes(row.state_id)">
|
||||
撤回
|
||||
</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
@@ -287,6 +291,26 @@ layout("/layouts/platform.html"){
|
||||
this.openView(data)
|
||||
} else if (type == 'primary') {
|
||||
this.openReview(data)
|
||||
} else if (type == 'revoke') {
|
||||
this.doRevoke(data)
|
||||
}
|
||||
},
|
||||
async doRevoke(row) {
|
||||
const confirm = await this.$confirm('确定要撤回吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
if (confirm === "confirm") {
|
||||
const resp = await $.post("/platform/jf/activity_bx/accounting/doRevoke", {id: row.id})
|
||||
if (resp.code === 0) {
|
||||
this.doSearch()
|
||||
this.$notify({
|
||||
title: '成功',
|
||||
message: resp.msg,
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
blur() {
|
||||
|
||||
Reference in New Issue
Block a user