瀏覽代碼

删除期判断修正

laiguoran 4 年之前
父節點
當前提交
d3eabb2ebc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/controller/measure_controller.js

+ 1 - 1
app/controller/measure_controller.js

@@ -247,7 +247,7 @@ module.exports = app => {
                 if (ctx.request.body.confirm !== undefined && ctx.request.body.confirm !== '确认删除本期') {
                     throw '请输入正确的文本信息';
                 }
-                if (stageInfo && (ctx.session.sessionUser.accountId !== stageInfo.user_id || (ctx.session.sessionUser.is_admin && ctx.request.body.confirm === '确认删除本期')) && stage_highOrder === stageInfo.order) {
+                if (stageInfo && (ctx.session.sessionUser.accountId === stageInfo.user_id || (ctx.session.sessionUser.is_admin && ctx.request.body.confirm === '确认删除本期')) && stage_highOrder === stageInfo.order) {
                     const result = await ctx.service.stage.deleteStage(stage_id);
                     if (!result) {
                         throw '删除计量期失败,请重试';