mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 02:08:15 +08:00
申请审核
This commit is contained in:
parent
3ca291d665
commit
ec36b7a5c4
@ -8,6 +8,9 @@ public class IscConstants {
|
||||
/** 审核通过 */
|
||||
public static final String AUDIT_PASS = "1";
|
||||
|
||||
/** 审核驳回 */
|
||||
public static final String AUDIT_REJECT = "2";
|
||||
|
||||
/** 待审核 */
|
||||
public static final String ONLINE_STATUS_ON = "1";
|
||||
|
||||
|
||||
@ -10,6 +10,7 @@ import com.ruoyi.common.core.validate.QueryGroup;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.isc.domain.bo.IscAppServiceApplyBo;
|
||||
import com.ruoyi.isc.domain.bo.IscAuditBo;
|
||||
import com.ruoyi.isc.domain.vo.IscAppServiceApplyVo;
|
||||
import com.ruoyi.isc.service.IIscAppServiceApplyService;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -79,8 +80,8 @@ public class IscAppServiceApplyController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('isc:serviceapply:audit')")
|
||||
@Log(title = "应用服务申请信息审核", businessType = BusinessType.AUDIT)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public AjaxResult<Void> audit(@Validated(EditGroup.class) @RequestBody IscAppServiceApplyBo bo) {
|
||||
return toAjax(iIscAppServiceApplyService.updateByBo(bo) ? 1 : 0);
|
||||
@PutMapping("/audit")
|
||||
public AjaxResult<Void> audit(@Validated @RequestBody IscAuditBo bo) {
|
||||
return toAjax(iIscAppServiceApplyService.audit(bo) ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -79,12 +79,6 @@ public class IscAppServiceApplyBo extends BaseEntity {
|
||||
@ApiModelProperty(value = "秒配额")
|
||||
private Long quotaSeconds;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
@ApiModelProperty(value = "删除标志(0代表存在 2代表删除)")
|
||||
private String delFlag;
|
||||
|
||||
|
||||
/**
|
||||
* 分页大小
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
package com.ruoyi.isc.domain.bo;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.common.core.validate.AddGroup;
|
||||
import com.ruoyi.common.core.validate.EditGroup;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 服务管控审核
|
||||
*
|
||||
* @author Wenchao Gong
|
||||
* @date 2021-09-09
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ApiModel("服务管控审核业务对象")
|
||||
public class IscAuditBo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID集合
|
||||
*/
|
||||
@ApiModelProperty(value = "ID集合")
|
||||
@NotEmpty(message = "请选择记录")
|
||||
private List<Long> ids;
|
||||
|
||||
/**
|
||||
* 审核状态(0待审核 1审核通过 2驳回)
|
||||
*/
|
||||
@ApiModelProperty(value = "审核状态(0待审核 1审核通过 2驳回)")
|
||||
@NotBlank(message = "请填写审核结果")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@ -4,6 +4,7 @@ import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.isc.domain.IscAppServiceApply;
|
||||
import com.ruoyi.isc.domain.bo.IscAppServiceApplyBo;
|
||||
import com.ruoyi.isc.domain.bo.IscAuditBo;
|
||||
import com.ruoyi.isc.domain.vo.IscAppServiceApplyVo;
|
||||
|
||||
import java.util.Collection;
|
||||
@ -53,4 +54,11 @@ public interface IIscAppServiceApplyService extends IServicePlus<IscAppServiceAp
|
||||
* @return
|
||||
*/
|
||||
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||
|
||||
/**
|
||||
* 应用服务审核
|
||||
* @param bo 审核业务数据
|
||||
* @return 是否审核成功
|
||||
*/
|
||||
Boolean audit(IscAuditBo bo);
|
||||
}
|
||||
|
||||
@ -2,16 +2,20 @@ package com.ruoyi.isc.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.ruoyi.common.constant.IscConstants;
|
||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||
import com.ruoyi.common.core.page.PagePlus;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.PageUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.isc.domain.IscAppService;
|
||||
import com.ruoyi.isc.domain.IscAppServiceApply;
|
||||
import com.ruoyi.isc.domain.bo.IscAppServiceApplyBo;
|
||||
import com.ruoyi.isc.domain.bo.IscAuditBo;
|
||||
import com.ruoyi.isc.domain.vo.IscAppServiceApplyVo;
|
||||
import com.ruoyi.isc.mapper.IscAppServiceApplyMapper;
|
||||
import com.ruoyi.isc.service.IIscAppServiceApplyService;
|
||||
@ -43,7 +47,9 @@ public class IscAppServiceApplyServiceImpl extends ServicePlusImpl<IscAppService
|
||||
|
||||
@Override
|
||||
public IscAppServiceApplyVo queryById(Long applyId){
|
||||
return getVoById(applyId);
|
||||
IscAppServiceApplyVo vo = getVoById(applyId);
|
||||
genServiceNameAndApplicationName(Arrays.asList(vo));
|
||||
return vo;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -128,4 +134,31 @@ public class IscAppServiceApplyServiceImpl extends ServicePlusImpl<IscAppService
|
||||
}
|
||||
return removeByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean audit(IscAuditBo bo)
|
||||
{
|
||||
switch (bo.getStatus()) {
|
||||
case IscConstants.AUDIT_PASS:
|
||||
break;
|
||||
case IscConstants.AUDIT_REJECT:
|
||||
Assert.notBlank(bo.getRemark(), () -> new ServiceException("审核意见不能为空"));
|
||||
break;
|
||||
default:
|
||||
throw new ServiceException("审核状态异常");
|
||||
}
|
||||
boolean result = true;
|
||||
for (Long id : bo.getIds())
|
||||
{
|
||||
IscAppServiceApply apply = getOne(Wrappers.<IscAppServiceApply>lambdaQuery()
|
||||
.eq(IscAppServiceApply::getApplyId, id)
|
||||
.eq(IscAppServiceApply::getStatus, IscConstants.AUDIT_WAIT), false);
|
||||
if(Objects.isNull(apply)) {
|
||||
continue;
|
||||
}
|
||||
result = updateById(new IscAppServiceApply().setApplyId(id).setStatus(bo.getStatus())
|
||||
.setAuditMind(bo.getRemark()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@ -17,28 +17,11 @@ export function getServiceapply(applyId) {
|
||||
})
|
||||
}
|
||||
|
||||
// 新增应用服务申请信息
|
||||
export function addServiceapply(data) {
|
||||
// 应用服务申请信息审核
|
||||
export function auditServiceapply(data) {
|
||||
return request({
|
||||
url: '/isc/serviceapply',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改应用服务申请信息
|
||||
export function updateServiceapply(data) {
|
||||
return request({
|
||||
url: '/isc/serviceapply',
|
||||
url: '/isc/serviceapply/audit',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除应用服务申请信息
|
||||
export function delServiceapply(applyId) {
|
||||
return request({
|
||||
url: '/isc/serviceapply/' + applyId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
@ -186,8 +186,8 @@
|
||||
<el-option key="3" label="3(月)" value="3"/>
|
||||
<el-option key="6" label="6(月)" value="6"/>
|
||||
<el-option key="9" label="9(月)" value="9"/>
|
||||
<el-option key="12" label="1(年)" value="12"/>
|
||||
<el-option key="24" label="2(年)" value="24"/>
|
||||
<el-option key="12" label="12(月)" value="12"/>
|
||||
<el-option key="24" label="24(月)" value="24"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="日配额" prop="quotaDays" v-if="this.applyType === 0 || this.applyType === 2">
|
||||
|
||||
@ -48,7 +48,11 @@
|
||||
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
||||
>
|
||||
<el-table-column label="分类名称" align="center" prop="cateName" width="160"/>
|
||||
<el-table-column label="启用状态" align="center" prop="enabled" :formatter="enabledFormat" />
|
||||
<el-table-column label="启用状态" align="center" prop="enabled" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="enabledOptions" :value="scope.row.enabled"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="显示顺序" align="center" prop="orderNum" />
|
||||
<el-table-column label="更新者" align="center" prop="updateBy" />
|
||||
<el-table-column label="更新时间" align="center" prop="updateTime" width="180">
|
||||
@ -205,10 +209,6 @@ export default {
|
||||
this.cateOptions.push(data);
|
||||
});
|
||||
},
|
||||
// 启用状态字典翻译
|
||||
enabledFormat(row, column) {
|
||||
return this.selectDictLabel(this.enabledOptions, row.enabled);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
|
||||
@ -101,9 +101,21 @@
|
||||
<el-table-column label="服务ID" align="center" prop="serviceId" width="100"/>
|
||||
<el-table-column label="服务名称" align="left" prop="serviceName" />
|
||||
<el-table-column label="服务分类" align="left" prop="cateName" width="150"/>
|
||||
<el-table-column label="服务状态" align="center" prop="enabled" :formatter="enabledFormat" width="100"/>
|
||||
<el-table-column label="是否在线" align="center" prop="onlineStatus" :formatter="onlineStatusFormat" width="100"/>
|
||||
<el-table-column label="审核状态" align="center" prop="status" :formatter="statusFormat" width="100"/>
|
||||
<el-table-column label="服务状态" align="center" prop="enabled" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="enabledOptions" :value="scope.row.enabled"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否在线" align="center" prop="onlineStatus" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="onlineStatusOptions" :value="scope.row.onlineStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核状态" align="center" prop="status" width="100">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="statusOptions" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="更新人" align="center" prop="updateBy" width="150"/>
|
||||
<el-table-column label="更新时间" align="center" prop="updateTime" width="150">
|
||||
<template slot-scope="scope">
|
||||
|
||||
@ -32,33 +32,13 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['isc:serviceapply:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['isc:serviceapply:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
icon="el-icon-view"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['isc:serviceapply:remove']"
|
||||
>删除</el-button>
|
||||
@click="handleAudit"
|
||||
v-hasPermi="['isc:serviceapply:audit']"
|
||||
>批量审核</el-button>
|
||||
</el-col>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
@ -75,7 +55,7 @@
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="serviceapplyList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="selectable"/>
|
||||
<el-table-column label="申请ID" align="center" prop="applyId" v-if="false"/>
|
||||
<el-table-column label="应用名称" align="left" prop="applicationName" />
|
||||
<el-table-column label="服务名称" align="left" prop="serviceName" />
|
||||
@ -105,17 +85,19 @@
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['isc:serviceapply:edit']"
|
||||
>修改</el-button>
|
||||
icon="el-icon-view"
|
||||
@click="handleAuditSingle(scope.row)"
|
||||
v-if="scope.row.status == 0"
|
||||
v-hasPermi="['isc:serviceapply:audit']"
|
||||
>审核</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['isc:serviceapply:remove']"
|
||||
>删除</el-button>
|
||||
icon="el-icon-info"
|
||||
@click="handleAuditSingle(scope.row)"
|
||||
v-if="scope.row.status > 0"
|
||||
v-hasPermi="['isc:serviceapply:query']"
|
||||
>查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -130,56 +112,68 @@
|
||||
|
||||
<!-- 添加或修改应用服务申请信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="应用服务ID" prop="appServiceId">
|
||||
<el-input v-model="form.appServiceId" placeholder="请输入应用服务ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="续期时长" prop="renewalDuration">
|
||||
<el-input v-model="form.renewalDuration" placeholder="请输入续期时长" />
|
||||
</el-form-item>
|
||||
<el-form-item label="天配额" prop="quotaDays">
|
||||
<el-input v-model="form.quotaDays" placeholder="请输入天配额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="小时配额" prop="quotaHours">
|
||||
<el-input v-model="form.quotaHours" placeholder="请输入小时配额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分钟配额" prop="quotaMinutes">
|
||||
<el-input v-model="form.quotaMinutes" placeholder="请输入分钟配额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="秒配额" prop="quotaSeconds">
|
||||
<el-input v-model="form.quotaSeconds" placeholder="请输入秒配额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建者" prop="createBy">
|
||||
<el-input v-model="form.createBy" placeholder="请输入创建者" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker clearable size="small"
|
||||
v-model="form.createTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="更新者" prop="updateBy">
|
||||
<el-input v-model="form.updateBy" placeholder="请输入更新者" />
|
||||
</el-form-item>
|
||||
<el-form-item label="更新时间" prop="updateTime">
|
||||
<el-date-picker clearable size="small"
|
||||
v-model="form.updateTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="选择更新时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="删除标志" prop="delFlag">
|
||||
<el-input v-model="form.delFlag" placeholder="请输入删除标志" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
<el-card shadow="never" v-if="!single" style="margin-bottom: 20px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">应用名称</el-col>
|
||||
<el-col :span="18" class="col-content">{{this.form.applicationName}}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">服务名称</el-col>
|
||||
<el-col :span="18" class="col-content">{{this.form.serviceName}}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">申请类型</el-col>
|
||||
<el-col :span="18" class="col-content">
|
||||
<dict-tag :options="applyTypeOptions" :value="this.form.applyType"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">审核状态</el-col>
|
||||
<el-col :span="18" class="col-content">
|
||||
<dict-tag :options="statusOptions" :value="this.form.status"/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">续期时长(月)</el-col>
|
||||
<el-col :span="18" class="col-content">{{this.form.renewalDuration}}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">每日配额</el-col>
|
||||
<el-col :span="18" class="col-content">{{this.form.quotaDays}}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">小时配额</el-col>
|
||||
<el-col :span="18" class="col-content">{{this.form.quotaHours}}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">分钟配额</el-col>
|
||||
<el-col :span="18" class="col-content">{{this.form.quotaMinutes}}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">每秒配额</el-col>
|
||||
<el-col :span="18" class="col-content">{{this.form.quotaSeconds}}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">提交人</el-col>
|
||||
<el-col :span="18" class="col-content">{{this.form.updateBy}}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">提交时间</el-col>
|
||||
<el-col :span="18" class="col-content">{{this.form.updateTime}}</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" class="col-title">备注</el-col>
|
||||
<el-col :span="18" class="col-content">{{this.form.remark}}</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-form ref="auditForm" :model="auditForm" :rules="rules" label-width="80px">
|
||||
<el-form-item label="审核意见" prop="remark">
|
||||
<el-input v-model="auditForm.remark" type="textarea" :disabled='this.form.status > 0' placeholder="请输入审核意见"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button :loading="buttonLoading" type="success" @click="submitForm(1)" icon="el-icon-check" v-if="this.form.status == 0">通 过</el-button>
|
||||
<el-button :loading="buttonLoading" type="warning" @click="submitForm(2)" icon="el-icon-close" v-if="this.form.status == 0">驳 回</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@ -187,7 +181,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listServiceapply, getServiceapply, delServiceapply, addServiceapply, updateServiceapply } from "@/api/isc/serviceapply";
|
||||
import { listServiceapply, getServiceapply, auditServiceapply } from "@/api/isc/serviceapply";
|
||||
|
||||
export default {
|
||||
name: "Serviceapply",
|
||||
@ -228,10 +222,12 @@ export default {
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 审核表单参数
|
||||
auditForm: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
appServiceId: [
|
||||
{ required: true, message: "应用服务ID不能为空", trigger: "blur" }
|
||||
remark: [
|
||||
{ max: 200, message: '最大长度为200个字符', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
};
|
||||
@ -260,24 +256,14 @@ export default {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
selectable(row, index) {
|
||||
return row.status == 0;
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
applyId: undefined,
|
||||
appServiceId: undefined,
|
||||
applyType: undefined,
|
||||
status: "0",
|
||||
auditMind: undefined,
|
||||
renewalDuration: undefined,
|
||||
quotaDays: undefined,
|
||||
quotaHours: undefined,
|
||||
quotaMinutes: undefined,
|
||||
quotaSeconds: undefined,
|
||||
createBy: undefined,
|
||||
createTime: undefined,
|
||||
updateBy: undefined,
|
||||
updateTime: undefined,
|
||||
delFlag: undefined,
|
||||
remark: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
@ -298,67 +284,52 @@ export default {
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加应用服务申请信息";
|
||||
/** 审核按钮操作 */
|
||||
handleAudit(row) {
|
||||
if(this.single) {
|
||||
this.open = true;
|
||||
this.title = "服务申请审核";
|
||||
this.auditForm.ids = this.ids;
|
||||
return;
|
||||
}
|
||||
this.handleAuditSingle(row);
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
handleAuditSingle(row) {
|
||||
this.single = false;
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const applyId = row.applyId || this.ids
|
||||
console.log(applyId)
|
||||
getServiceapply(applyId).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改应用服务申请信息";
|
||||
this.title = "服务申请审核";
|
||||
this.auditForm.ids = [applyId]
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
submitForm(status) {
|
||||
this.auditForm.status = status;
|
||||
this.$refs["auditForm"].validate(valid => {
|
||||
if (valid) {
|
||||
this.buttonLoading = true;
|
||||
if (this.form.applyId != null) {
|
||||
updateServiceapply(this.form).then(response => {
|
||||
this.msgSuccess("修改成功");
|
||||
console.log(this.auditForm)
|
||||
if (this.auditForm.ids.length > 0) {
|
||||
auditServiceapply(this.auditForm).then(response => {
|
||||
this.msgSuccess("审核成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
} else {
|
||||
addServiceapply(this.form).then(response => {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
}).finally(() => {
|
||||
this.msgError("请选择记录");
|
||||
this.buttonLoading = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const applyIds = row.applyId || this.ids;
|
||||
this.$confirm('是否确认删除应用服务申请信息编号为"' + applyIds + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(() => {
|
||||
this.loading = true;
|
||||
return delServiceapply(applyIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.downLoadExcel('/isc/serviceapply/export', this.queryParams);
|
||||
@ -366,3 +337,15 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-card .el-row {
|
||||
font-size: 14px;
|
||||
line-height: 36px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.el-card .el-row .col-title {
|
||||
text-align: right;
|
||||
color: #606266;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user