admin撤回流程后,数据状态变为草稿,这个时候admin应该只有查看权限;只有发起人才能编辑草稿
parent
f7e18719a6
commit
998278fd7e
|
@ -163,6 +163,10 @@ public class ProcessController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/completed")
|
@GetMapping("/completed")
|
||||||
public String completed(Model model) {
|
public String completed(Model model) {
|
||||||
|
Admin admin = getLoginUser();
|
||||||
|
// 超级管理员,只有查看权限,不能编辑和删除除非是自己的
|
||||||
|
model.addAttribute("adminId", admin.getId());
|
||||||
|
model.addAttribute("isAdmin", isAdministrator(admin));
|
||||||
model.addAttribute("processTypes", ProcessType.values());
|
model.addAttribute("processTypes", ProcessType.values());
|
||||||
model.addAttribute("processStatus", ProcessStatus.values());
|
model.addAttribute("processStatus", ProcessStatus.values());
|
||||||
return "/admin/business/process-completed";
|
return "/admin/business/process-completed";
|
||||||
|
|
|
@ -124,19 +124,30 @@
|
||||||
|
|
||||||
<el-table-column label="操作" fixed="right" width="230">
|
<el-table-column label="操作" fixed="right" width="230">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button type="text" @click="showDetail(scope.row, scope)">查看详情</el-button>
|
||||||
v-if="scope.row.status==='audit_passed' || scope.row.status==='audit_not_passed' || scope.row.status==='to_be_audit'"
|
|
||||||
type="text" @click="showDetail(scope.row, scope)">查看详情
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
v-if="scope.row.status==='audit_passed' || scope.row.status==='audit_not_passed' || scope.row.status==='to_be_audit'"
|
v-if="scope.row.status==='audit_passed' || scope.row.status==='audit_not_passed' || scope.row.status==='to_be_audit'"
|
||||||
type="text" @click="showAuditDetail(scope.row, scope)">查看审核流程
|
type="text" @click="showAuditDetail(scope.row, scope)">查看审核流程
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="scope.row.status==='draft' || scope.row.status==='audit_not_passed'"
|
<#if isAdmin>
|
||||||
type="text" @click="editProcess(scope.row, scope)">编辑
|
<#--判断是不是管理员本人的-->
|
||||||
</el-button>
|
<el-button v-if="scope.row.applyPersonId==='${adminId}'" type="text" @click="editProcess(scope.row, scope)">编辑
|
||||||
|
</el-button>
|
||||||
|
<#else>
|
||||||
|
<el-button v-if="scope.row.status==='draft' || scope.row.status==='audit_not_passed'"
|
||||||
|
type="text" @click="editProcess(scope.row, scope)">编辑
|
||||||
|
</el-button>
|
||||||
|
</#if>
|
||||||
<el-button v-if="scope.row.status==='to_be_audit'" type="text" @click="revokeProcess(scope.row, scope)">撤回</el-button>
|
<el-button v-if="scope.row.status==='to_be_audit'" type="text" @click="revokeProcess(scope.row, scope)">撤回</el-button>
|
||||||
<el-button v-if="scope.row.status==='draft'" type="text" @click="deleteProcess(scope.row, scope)">删除</el-button>
|
|
||||||
|
<#if isAdmin>
|
||||||
|
<#--判断是不是管理员本人的-->
|
||||||
|
<el-button v-if="scope.row.applyPersonId==='${adminId}'" type="text"
|
||||||
|
@click="deleteProcess(scope.row, scope)">删除
|
||||||
|
</el-button>
|
||||||
|
<#else>
|
||||||
|
<el-button v-if="scope.row.status==='draft'" type="text" @click="deleteProcess(scope.row, scope)">删除</el-button>
|
||||||
|
</#if>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -204,6 +215,21 @@
|
||||||
return response.json()
|
return response.json()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 给定一个数字,保留两位小数输出,格式化为包含分隔符
|
||||||
|
* @param f
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function numberFixed(f) {
|
||||||
|
if (!f) {
|
||||||
|
return "0.00";
|
||||||
|
}
|
||||||
|
//return Number(f).toFixed(2);
|
||||||
|
//格式化413,423,423.24
|
||||||
|
f = Number(f).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2, useGrouping: true });
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
const data = () => {
|
const data = () => {
|
||||||
return {
|
return {
|
||||||
auditForm: {
|
auditForm: {
|
||||||
|
|
|
@ -355,6 +355,21 @@
|
||||||
return /\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(path);
|
return /\w.(png|jpg|jpeg|svg|webp|gif|bmp)$/i.test(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 给定一个数字,保留两位小数输出,格式化为包含分隔符
|
||||||
|
* @param f
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function numberFixed(f) {
|
||||||
|
if (!f) {
|
||||||
|
return "0.00";
|
||||||
|
}
|
||||||
|
//return Number(f).toFixed(2);
|
||||||
|
//格式化413,423,423.24
|
||||||
|
f = Number(f).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2, useGrouping: true });
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
const data = () => {
|
const data = () => {
|
||||||
return {
|
return {
|
||||||
process: {},
|
process: {},
|
||||||
|
|
|
@ -521,6 +521,21 @@
|
||||||
".png", ".jpg", ".jpeg", ".gif", ".bmp", ".webp"
|
".png", ".jpg", ".jpeg", ".gif", ".bmp", ".webp"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 给定一个数字,保留两位小数输出,格式化为包含分隔符
|
||||||
|
* @param f
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function numberFixed(f) {
|
||||||
|
if (!f) {
|
||||||
|
return "0.00";
|
||||||
|
}
|
||||||
|
//return Number(f).toFixed(2);
|
||||||
|
//格式化413,423,423.24
|
||||||
|
f = Number(f).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2, useGrouping: true });
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
const isEmpty = (obj) => {
|
const isEmpty = (obj) => {
|
||||||
if (!obj) {
|
if (!obj) {
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -685,6 +685,21 @@
|
||||||
return response.json()
|
return response.json()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 给定一个数字,保留两位小数输出,格式化为包含分隔符
|
||||||
|
* @param f
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function numberFixed(f) {
|
||||||
|
if (!f) {
|
||||||
|
return "0.00";
|
||||||
|
}
|
||||||
|
//return Number(f).toFixed(2);
|
||||||
|
//格式化413,423,423.24
|
||||||
|
f = Number(f).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2, useGrouping: true });
|
||||||
|
return f;
|
||||||
|
}
|
||||||
|
|
||||||
const data = () => {
|
const data = () => {
|
||||||
return {
|
return {
|
||||||
mode: "btn", // btn , procurementContractProcess
|
mode: "btn", // btn , procurementContractProcess
|
||||||
|
|
|
@ -190,7 +190,20 @@
|
||||||
function parseJSON(response) {
|
function parseJSON(response) {
|
||||||
return response.json()
|
return response.json()
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 给定一个数字,保留两位小数输出,格式化为包含分隔符
|
||||||
|
* @param f
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
function numberFixed(f) {
|
||||||
|
if (!f) {
|
||||||
|
return "0.00";
|
||||||
|
}
|
||||||
|
//return Number(f).toFixed(2);
|
||||||
|
//格式化413,423,423.24
|
||||||
|
f = Number(f).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2, useGrouping: true });
|
||||||
|
return f;
|
||||||
|
}
|
||||||
const data = () => {
|
const data = () => {
|
||||||
return {
|
return {
|
||||||
auditForm: {
|
auditForm: {
|
||||||
|
|
Loading…
Reference in New Issue